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.... Quote Link to comment 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] Quote Link to comment 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.