Just follow something along these lines:

<?php
if ($_POST) {
    /*-- processing code goes here --*/
} else {
    /*-- display code goes here --*/
}
?>
----- Original Message -----
From: "Jerry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 17, 2002 1:57 PM
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

Reply via email to