Previous Thread
Next Thread
Print Thread
Rate Thread
#285298 05/14/2005 6:24 PM
Joined: Oct 2002
Posts: 11
Junior Member
Junior Member
Offline
Joined: Oct 2002
Posts: 11
I'm brand new to Threads, so forgive me if this is a dumb question, but I did search the forums first!

I've been digging around in the program a bit and so far, most everything seems pretty self-explanatory. The one thing that's confusing me is this little variable $what. Can someone tell me what exactly $what is? I gather that it has something to do with where the user is going to be sent after performing an action, but I never seem to find it where I expect it, and yet I keep finding it in places where I don't.

Is there a rhyme and/or reason to $what that I'm not grasping? I'd love to have a better understanding of when and why it is set, and how it is used.

Thanks in advance!

Sponsored Links
rmansperger #285299 05/15/2005 10:13 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
It would depend on what script you're seeing it is. Obviously a placeholder for something... where it is used would be a big clue. Otherwise there's thousands of variables used in threads, and many used for different reasons in different scripts.

Daine #285300 05/16/2005 7:14 AM
Joined: Oct 2002
Posts: 11
Junior Member
Junior Member
Offline
Joined: Oct 2002
Posts: 11
As far as I can tell, $what is a single variable used throughout the entire program. In almost every script I've looked at, it gets its value from the POST of the referring script, and then sends its value on to another script in POST. (For example, take a look at manageoptions.php.)

Sometimes, $what seems to be the destination page, as the script will send the user to $what.php. But I haven't yet figured out where it's initially defined or what the purpose of any of it is. It's an oddly uninformative name for a variable.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
From postlist $what would be either "flat" or "threaded" then the links are to show$what.php so it'll link to either showflat or showthreaded. The admin area, sometimes $what will indicate the function being performed, or the tab that you were on. In manageoptions.... it doesn't appear to have any purpose at all. LOL Maybe it was copied from other admin files where it's used? But I can't see any of the scripts after that using it.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
[]What is $what? [/]

to add a little humour... What is the fellows name on 2nd Base..

and what Josh said.

Sponsored Links
234234 #285303 05/17/2005 10:23 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Who's on second base?

Daine #285304 05/17/2005 10:35 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
no, who's on first


- Allen wavey
- What Drives You?
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
I don't know?

234234 #285306 05/18/2005 4:05 PM
Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
This could get ugly...



Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)