Cell0518 Posted August 11, 2006 Share Posted August 11, 2006 I am passing a variable through the url ($_get)example:http://www.dslr-photography.com/chk_id.php?id=3[code]<?php //Setup $id echo "ID CHECKER<br />"; $id == $_get['id']; echo "Story ID = ".$id;?>[/code]Why is this not working? I am very frustrated with this simple, stupid problem. ??? >:( :-[I've tried $_GET, $_get, 'id', "id". Link to comment https://forums.phpfreaks.com/topic/17258-frustration-with-a-simple-variable-solved/ Share on other sites More sharing options...
shocker-z Posted August 11, 2006 Share Posted August 11, 2006 == is equals as in for use in if statements e.g. if (1==1) { echo ('1 is equal to 1') } what you need is just =[code]<?php //Setup $id echo "ID CHECKER<br />"; $id = $_get['id']; echo "Story ID = ".$id;?>[/code]See how that goes mate :)RegardsLiam Link to comment https://forums.phpfreaks.com/topic/17258-frustration-with-a-simple-variable-solved/#findComment-73152 Share on other sites More sharing options...
sasa Posted August 11, 2006 Share Posted August 11, 2006 line 4 must be $id = $_GET['id']; not == Link to comment https://forums.phpfreaks.com/topic/17258-frustration-with-a-simple-variable-solved/#findComment-73154 Share on other sites More sharing options...
Cell0518 Posted August 11, 2006 Author Share Posted August 11, 2006 Fixed,Thanks. I didn't realize you needed both GET and =.Thanks. Link to comment https://forums.phpfreaks.com/topic/17258-frustration-with-a-simple-variable-solved/#findComment-73155 Share on other sites More sharing options...
shocker-z Posted August 11, 2006 Share Posted August 11, 2006 try F5 refresh or ctrl + F5 as that link actualy works fine for me :)liam Link to comment https://forums.phpfreaks.com/topic/17258-frustration-with-a-simple-variable-solved/#findComment-73159 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.