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 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 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. 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 Link to comment https://forums.phpfreaks.com/topic/65698-solved-php-location-redirect/#findComment-328141 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.