Xeon-YK Posted April 20, 2006 Share Posted April 20, 2006 i have 2 php file, tes and tes2.tes :<form name="form1" method="post" action="tes2.php"><? if( !isset($msg)) { echo "tes"; } else echo "tes1";?> <input type="text" name="textfield"> <input type="submit" name="Submit" value="Submit"></form><??>tes2 :<? header( "location: tes.php?msg=1" ) ;?>when i click on submit button, it will go to tes2.php and tes2.php will redirect back to tes.php and set msg=1but when i try in my computer $msg always zero. why???i try this in two computer, first computer work and second computer didn't work. may be i must setting php.ini file, but i don't know to set it???how can i solve this problem... thank.... Link to comment https://forums.phpfreaks.com/topic/7926-get-value-when-redirect-page/ Share on other sites More sharing options...
sasa Posted April 20, 2006 Share Posted April 20, 2006 [!--quoteo(post=366729:date=Apr 20 2006, 10:05 AM:name=Xeon-YK)--][div class=\'quotetop\']QUOTE(Xeon-YK @ Apr 20 2006, 10:05 AM) [snapback]366729[/snapback][/div][div class=\'quotemain\'][!--quotec--]i have 2 php file, tes and tes2.tes :<form name="form1" method="post" action="tes2.php"><? if( !isset($msg)) { echo "tes"; } else echo "tes1";?> <input type="text" name="textfield"> <input type="submit" name="Submit" value="Submit"></form><??>tes2 :<? header( "location: tes.php?msg=1" ) ;?>when i click on submit button, it will go to tes2.php and tes2.php will redirect back to tes.php and set msg=1but when i try in my computer $msg always zero. why???i try this in two computer, first computer work and second computer didn't work. may be i must setting php.ini file, but i don't know to set it???how can i solve this problem... thank....[/quote]change line[code]if( !isset($msg))[/code]to[code]if( !isset($_GET['msg']))[/code] Link to comment https://forums.phpfreaks.com/topic/7926-get-value-when-redirect-page/#findComment-28880 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.