|
Posted by Tyno Gendo on 04/05/07 22:02
Jerry Stuckle wrote:
[snip]
>> So it does some data validation at the top. If $Email is empty, it
>> shows the form on the screen for the user to fill out. It also puts
>> the appropriate error message next to the email question. If $Email is
>> not empty when the user clicks submit, the form verifies it is not
>> empty, and then calls the next page. The obvious problem is that when
>> the page first loads, it displays the error message.
>>
>
> Before validating see if $_POST['Submit'] contains 'Continue' or not. If
> not, don't validate.
>
Or you can wrap your checks with the following also, so it only does it
on POST
if ( $_SERVER["REQUEST_METHOD"] == "POST" ) {
// validation checks
}
Navigation:
[Reply to this message]
|