petenetman Posted July 11, 2010 Share Posted July 11, 2010 It's been driving me mad. For some reason I cannot get the $GET to work. What I have is http://localhost/working/JobData2.php?16 I want to pass the valve 16 to a job number i.e $Jobno = $_GET['Jobno']; If I use print_r($_Get); if($_GET["a"] === "") echo "a is an empty string\n"; if($_GET["a"] === false) echo "a is false\n"; if($_GET["n"] === null) echo "a is null\n"; if(isset($_GET["a"])) echo "a is set\n"; I get a null value returned. Can some help please? Link to comment https://forums.phpfreaks.com/topic/207421-help-with-php-get/ Share on other sites More sharing options...
wildteen88 Posted July 11, 2010 Share Posted July 11, 2010 Your url is incorrect. The format is filenamep.php?variable_name_here=some_value_here. You then use $_GET['variable_name_here'] to get the value from the url. So if your url is http://localhost/working/JobData2.php?a=16 Then you'll use $_GET['a'] to get the value of 16 from the url. Link to comment https://forums.phpfreaks.com/topic/207421-help-with-php-get/#findComment-1084415 Share on other sites More sharing options...
petenetman Posted July 11, 2010 Author Share Posted July 11, 2010 WOW that was fast.... My day is going to be great.... All fixed now! Thanks P Link to comment https://forums.phpfreaks.com/topic/207421-help-with-php-get/#findComment-1084417 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.