![]() |
PHP guys?
Alright.. I'm sure you guys have all seen scripts where all navigation is controlled through index.php
ex: index.php?mode=register would get the person of to register.php Well, I'm trying to get a script installed, everything seems to be working fine.. except.. none of the links work. All of the navigational links work through index.php like mentioned above, but every single one just brings me back to the index.php main homepage. any suggestions? |
bump5678
|
I wouldn't be suprised if it was a sessions issue. but I couldn't really be able to tell without knowing or seeing the script
|
prolly just register globals.. older versions of PHP had register globals on as standard.. newer versions don't.
which means: when the script is trying the get the "mode" variable it is probably just calling $mode, when it should be calling $_GET["mode"] - which in turn means that it gets an empty $mode variable and just defaults to the main page |
Quote:
|
Quote:
WOA.. I NEED SOME PHP CLASSES AND SHIT |
was I right?
|
open php.ini, searh for register_globals and change Off into On and you are all set
|
Quote:
Quote:
Sorry it took so long to reply (I know at least 1 of you guys were wondering). I just checked my phpinfo and I did see this.. register_globals Off Off This particular server is a VPS, and I've got no idea hot to SSH or get into php.ini, so I emailed me host and asked them to change it for me. I'll post back if that fixed it. |
Quote:
|
I would suggest keeping register_globals off, and edit the script.
|
Quote:
|
brizzad is a jew
|
well...
I might be wrong, or didnt understand your problem, btut: index.php?mode=register that assumes that you'll handle that GET variable inside the php. So.... if($_GET['mode'] hahahaha "register") { header("location: youraddress/register.php } or if($_GET['mode']) { [from here you can go either by testing every condition by if, or case) if($_GET['mode'] hahahaha "register") header() // see above or $whatever = $_GET['mode']; switch($whatever) { case "register": header()../see above break; case "whatever"... and so on... hope that helped a bit |
what script are you using?
|
hahaha is = =, and change header("location: youraddress/register.php to header("location: youraddress/register.php");
|
All times are GMT -7. The time now is 03:23 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123