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: [EMAIL PROTECTED] Heartland Business Systems http://www.hbs.net -----Original Message----- From: Jerry [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 1:58 PM To: [EMAIL PROTECTED] 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 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php