bobinindia Posted January 20, 2008 Share Posted January 20, 2008 Hi i want to to redirect like this header('Location: edit.php?id=$id'); $id is set. It also works fine if i replace $id with 3 for example. Help much appreciated. Bob ??? Link to comment https://forums.phpfreaks.com/topic/86872-solved-header-with-variables-problem/ Share on other sites More sharing options...
Stooney Posted January 20, 2008 Share Posted January 20, 2008 header("Location: edit.php?id=$id"); Link to comment https://forums.phpfreaks.com/topic/86872-solved-header-with-variables-problem/#findComment-444118 Share on other sites More sharing options...
KrisNz Posted January 20, 2008 Share Posted January 20, 2008 Read all about strings Link to comment https://forums.phpfreaks.com/topic/86872-solved-header-with-variables-problem/#findComment-444119 Share on other sites More sharing options...
Ken2k7 Posted January 20, 2008 Share Posted January 20, 2008 header("Location: edit.php?id=$id"); That's the same thing. Can you tell me what the URL is that it redirects you to? Just copy and paste. Link to comment https://forums.phpfreaks.com/topic/86872-solved-header-with-variables-problem/#findComment-444120 Share on other sites More sharing options...
Guest Posted January 20, 2008 Share Posted January 20, 2008 It isn't the same thing. The difference is in using double quotes versus single quotes. Variables within double quotes evaluate to their value, variable without single quotes are taken literally as text. Link to comment https://forums.phpfreaks.com/topic/86872-solved-header-with-variables-problem/#findComment-444121 Share on other sites More sharing options...
bobinindia Posted January 20, 2008 Author Share Posted January 20, 2008 THANK YOU ALL. It's always the smallest detail!! Link to comment https://forums.phpfreaks.com/topic/86872-solved-header-with-variables-problem/#findComment-444139 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.