jenniferG Posted August 19, 2007 Share Posted August 19, 2007 We are trying to pass a variable in a redirect statement in PHP 4+. It looks like the value VAL is not getting passed properly. Is this the correct syntax? $VAL= '' . $INDEXB; header('Location: http://msdsimaging.com/sidemo/request_3.php?INDEXB=$VAL'); Thanks, Natalie Quote Link to comment https://forums.phpfreaks.com/topic/65698-solved-php-location-redirect/ Share on other sites More sharing options...
MadTechie Posted August 19, 2007 Share Posted August 19, 2007 yep syntax is ok BUT DO double quotes header("Location: http://msdsimaging.com/sidemo/request_3.php?INDEXB=$VAL"); as INDEXB would equal $VAL not its value with single quotes Quote Link to comment https://forums.phpfreaks.com/topic/65698-solved-php-location-redirect/#findComment-328133 Share on other sites More sharing options...
phpSensei Posted August 19, 2007 Share Posted August 19, 2007 I Tried Double Quotes, but I put signle quotes for the $VAR... Works fine. Quote Link to comment https://forums.phpfreaks.com/topic/65698-solved-php-location-redirect/#findComment-328139 Share on other sites More sharing options...
MadTechie Posted August 19, 2007 Share Posted August 19, 2007 header("Location: http://msdsimaging.com/sidemo/request_3.php?INDEXB=$INDEXB"); will work to check it do this die("Location: http://msdsimaging.com/sidemo/request_3.php?INDEXB=$INDEXB"); that will echo and stop the script if it ends with INDEXB= then $INDEXB has no value Quote Link to comment https://forums.phpfreaks.com/topic/65698-solved-php-location-redirect/#findComment-328141 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.