Hello,
I'm running PHP 5.2.9 on a local server to test my projects locally but for some reason using $_GET will not return the values in the URL and will throw an "Undefined Index" notice. If I upload the same script to my web host, it works as it should.
For example, on my local server, the URL I'm using for the test script is /new_file.php?name=Joe. Then, to retrieve the value of "name", I use this:
<?php
$name = $_GET['name'];
echo $name;
?>
Which results in:
If I check to see if "name" is defined the URL, I can evade the notice, but the value of "name" is still not retrieved from the URL:
<?php
if (isset($_GET['name'])) {
$name = $_GET['name'];
} else {
$name = '';
}
echo $name;
?>
I haven't made any modifications to php.ini and I've searched for hours on various forums and other web sites for a solution but I can't seem to find one... Any help at all would be greatly appreciated!
Thank you,
--Sean