RE: [PHP-WIN] Newbie Form Question

From: Date: Tue, 17 Dec 2002 20:16:36 +0000
Subject: RE: [PHP-WIN] Newbie Form Question
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-17476@lists.php.net to get a copy of this message
Put a hidden field in your form: <form action="thispage.php"> <input type="hidden" name="action" value="display"> ...... </form> Then at the top of you page put something like: <? If ($_REQUEST['action'] = "display") run code and display results ?> So now the form will have to be submitted before the calculations are done. Thought I am sure there are other ways. _______________________________________________________________ Sterling Anderson Systems Analyst email: sanderson@hbs.net Heartland Business Systems http://www.hbs.net -----Original Message----- From: Jerry [mailto:jerry.plotkin@tenethealth.com] Sent: Tuesday, December 17, 2002 1:58 PM To: php-windows@lists.php.net Subject: [PHP-WIN] Newbie Form Question Hi All, I was playing around creating a simple Form for testing simple subtraction. Two variables with random numbers that are displayed and a text box for the user to enter the answer. random number - random number = "textbox here" "Submit Button Here" I test to see if the answer the user typed in is correct and display the correct answer. The problem is I only want to use one page (self in the action of the form). When you start the page in the browser the answer is already displayed. How do show the answer after the Submit Button is clicked. If I was sending this to a different php page for processing I wouldn't have a problem but I'm not sure how to use self as the action of the form. Thanks, Jerry -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.windows (#17476) next »