max_w1 Posted March 12, 2008 Share Posted March 12, 2008 hi i want to send Variables through GET but it is displaying the variable itself. i am trying to do something like this. <?php $name = "value"; header ('Location: page.php?value=$name'); exit(); ?> but when i try to echo the value it displays "$name" Pleaseeeeeeeee help!!!!! Link to comment https://forums.phpfreaks.com/topic/95794-sending-variables-through-_get-method/ Share on other sites More sharing options...
kenrbnsn Posted March 12, 2008 Share Posted March 12, 2008 Variables are not evaluated when enclosed in single quotes, use double quotes instead or concatenation. <?php $name = "value"; header ("Location: page.php?value=$name"); exit(); ?> Ken Link to comment https://forums.phpfreaks.com/topic/95794-sending-variables-through-_get-method/#findComment-490406 Share on other sites More sharing options...
max_w1 Posted March 12, 2008 Author Share Posted March 12, 2008 Thanks kenrbnsn! it worked!!! thankyou very much!!!!! Link to comment https://forums.phpfreaks.com/topic/95794-sending-variables-through-_get-method/#findComment-490416 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.