Jump to content

Won't recognize variables in the URL


e33basketball

Recommended Posts

Hi,

I have a server running off my PC, mostly for testing... and it has PHP/MySQL installed.
Everything works pretty well, except for some reason it's not recognizing any variables that I put in the URL.
Example...

url = www.site.com/index.php?check=1

if($check == "1"){
echo"one!";
} else {
echo"something else!";
}

no matter what i set check at... i still get "something else" ...

or... if i where to say echo"$check"; ... nothings there....

any ideas...

thanks,

Erik
Link to comment
Share on other sites

How php treats sertain variables depends on one setting in the php.ini file which is the [b]regsiter_globals[/b] setting. Your shared hosting account has this set to [b]On[/b] (which isn't recommended any more as it can lead to security issues) and you local server has it turn [b]Off[/b] which is recommended.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.