Two suggestions:

Use

if (!isset($submit))

OR

change the order around

<?php

if ($submit)
{
    // Results of login form, including login failed or successful print()
}
    else
{
    // First html page containing login form
}

?>

kind regards,

bill hollett


Tarrant Costelloe wrote:

> When using:
>
> <?php if (!$submit)
> {
> // First html page containing login form
> }
> else
> {
> // Results of login form, including login failed or successful print()
> }
> >?
>
> I get an error on line one, due to it at first not recognising the variable
> $submit. If I ignore this and continue to fill in the form, on the clicking
> the submit button I am then delivered to the same page of which it shows the
> results.
>
> So the only problem being, is when you first go to the page you get:
>
> Warning: Undefined variable: submit in C:\Documents and Settings\Tarrant
> Costelloe\Desktop\locahost\default.php on line 1
>
> then the form, on which being filled in and submitted brings you back to the
> page without the message and a print() of whether login successful or not.
> How do I get rid of the original error?
>
> Tarrant Costelloe
> Web Developer
> InsurE-com Ltd.
> ------------------------------------
> Office Tel:  +44 (0)1273 852014
> Mobile: +44 07714087114
> [EMAIL PROTECTED]
> http://www.insur-e.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to