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 ??? Quote 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"); Quote 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 Quote 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. Quote 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. Quote 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!! Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.