|
Joined: Oct 2002
Posts: 11
Junior Member
|
Junior Member
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! 
|
|
|
|
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.
|
|
|
|
Joined: Oct 2002
Posts: 11
Junior Member
|
Junior Member
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.
|
|
|
|
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? 
|
|
|
|
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 
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
|
|
|
|
Joined: Aug 2000
Posts: 1,609
Addict
|
Addict
Joined: Aug 2000
Posts: 1,609 |
This could get ugly... 
|
|
|
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.
|
|
Posts: 69
Joined: January 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|