jbeannie05 Posted January 27, 2012 Share Posted January 27, 2012 It's a php form and i don't know what i did wrong, because the php form doesn't do anything, i don't know what to change the php code to 17431_.php Quote Link to comment https://forums.phpfreaks.com/topic/255857-can-anyone-help-me-fix-this-php-code/ Share on other sites More sharing options...
scootstah Posted January 27, 2012 Share Posted January 27, 2012 What is it supposed to do? Quote Link to comment https://forums.phpfreaks.com/topic/255857-can-anyone-help-me-fix-this-php-code/#findComment-1311558 Share on other sites More sharing options...
AyKay47 Posted January 27, 2012 Share Posted January 27, 2012 you should be checking to make sure that the submit button has been pressed before attempting to output the $_GET values. <form action="" method="get"> Name: <input type="text" name="fname" /> Age: <input type="text" name="age" /> <input type="submit" name="submit" /> </form> <?php if(isset($_GET['submit'])) { ?> Welcome <?php echo $_GET["fname"]; ?>.<br /> You are <?php echo $_GET["age"]; ?> years old! <?php } ?> Quote Link to comment https://forums.phpfreaks.com/topic/255857-can-anyone-help-me-fix-this-php-code/#findComment-1311561 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.