if (!isset($submit))
:)
on 8/7/01 8:47 AM, Tarrant Costelloe at [EMAIL PROTECTED] wrote:
> When using if (!$submit) I get an error saying:
> Warning: Undefined variable: submit in C:\Inetpub\webpub\default.php on line
> 1
> Fair enough, so then I add if (isset(!$submit)) and I then get an erro
On Tue, Aug 07, 2001 at 03:47:19PM +0100, Tarrant Costelloe wrote:
> When using if (!$submit) I get an error saying:
> Warning: Undefined variable: submit in C:\Inetpub\webpub\default.php on line
> 1
> Fair enough, so then I add if (isset(!$submit)) and I then get an error;
> Parse error: parse e
try.
if(isset($submit))
{
}
chris
- Original Message -
From: Tarrant Costelloe <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 07, 2001 10:47 AM
Subject: [PHP] if(!$submit)
> When using if (!$submit) I get an error saying:
> Warning: Undefined v
ED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 07, 2001 4:47 PM
Subject: [PHP] if(!$submit)
> When using if (!$submit) I get an error saying:
> Warning: Undefined variable: submit in C:\Inetpub\webpub\default.php on
line
> 1
> Fair enough, so then I add if (isset(!$subm
When using if (!$submit) I get an error saying:
Warning: Undefined variable: submit in C:\Inetpub\webpub\default.php on line
1
Fair enough, so then I add if (isset(!$submit)) and I then get an error;
Parse error: parse error, expecting `T_VARIABLE' or `'$''
Could someone please tell me the more
On Mon, May 21, 2001 at 03:15:37PM +0100, Tarrant Costelloe wrote :
> Whenever I use the ? statement in a php page it always
> comes up with:
>
> Warning: Undefined variable
> Until the submit has been hit, and then it continue on with the rest of the
> script fine ( ifelse).
>
> How do you st
For the sake of completeness, whenever PHP encounters a reference to a
variable which has not been set it will throw a warning.
The reason most people don't see that behavior is that their version of PHP
uses the default setting of "show all errors but don't mention the
warnings". If they use:
e
error_reporting (E_ALL ^ E_NOTICE);
http://www.php.net/manual/en/function.error-reporting.php
I personally change my php.ini setting to:
error_reporting = E_ALL & ~E_NOTICE
Then at the top of my scripts which I want to debug I add the line:
error_reporting(E_ALL);
Plutarck
"Tarrant Cost
i always use such statements like :
if ($submit) { then do this }
else { render the page
}
and it works fine...
-Original Message-
From: Tarrant Costelloe [mailto:[EMAIL PROTECTED]]
Sent: 21 May 2001 15:16
To: Php (E-mail)
Subject: [PHP] if $submit
Whenever I use the ? statement in
Hello Tarrant,
1st solution:
turn off warnings in php.ini
2nd: use
if(isset($submit)) { .. . .. . }
Monday, May 21, 2001, 5:15:37 PM, you wrote:
TC> Whenever I use the ? statement in a php page it always
TC> comes up with:
TC> Warning: Undefined variable
TC> Until the submit has bee
Whenever I use the ? statement in a php page it always
comes up with:
Warning: Undefined variable
Until the submit has been hit, and then it continue on with the rest of the
script fine ( ifelse).
How do you stop this warning message?
Thanks in advance!
Tarrant Costelloe
Web Developer
InsurE-
The reason you're getting the undefined variable warning level is because
your error reporting level which is set in php.ini or explicitly in your
code is set to spit out warning, so you'll want to change that before doing
anything other than just testing.
Plutarck
"Tarrant Costelloe" <[EMAIL P
Two suggestions:
Use
if (!isset($submit))
OR
change the order around
kind regards,
bill hollett
Tarrant Costelloe wrote:
> When using:
>
> {
> // First html page containing login form
> }
> else
> {
> // Results of login form, including login failed or successful print()
> }
> >?
>
> I
When using:
?
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 firs
14 matches
Mail list logo