If (!$submit)

From: Date: Thu, 17 May 2001 13:52:31 +0000
Subject: If (!$submit)
Groups: php.general 
Request: Send a blank email to php-general+get-53235@lists.php.net to get a copy of this message
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 tcostelloe@insur-e.net http://www.insur-e.net

« previous php.general (#53235) next »