Re: [PHP] if(!$submit)

2001-08-07 Thread mike cullerton

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 error;
> Parse error: parse error, expecting `T_VARIABLE' or `'$''
> Could someone please tell me the more than likely simple sollution.
> 
> Thanks
> 
> Taz


-- mike cullerton



-- 
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]




Re: [PHP] if(!$submit)

2001-08-07 Thread Renze Munnik

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 error, expecting `T_VARIABLE' or `'$'' 
> Could someone please tell me the more than likely simple sollution.
> 
> Thanks
> 
> Taz

if (!isset ($submit))
or
if (!isset ($submit) || empty ($submit))

You were SO close!

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

-- 
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]




Re: [PHP] if(!$submit)

2001-08-07 Thread Chris Cocuzzo

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 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 than likely simple sollution.
>
> Thanks
>
> Taz
>
> --
> 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]




Re: [PHP] if(!$submit)

2001-08-07 Thread Wagner Tomy

> Fair enough, so then I add if (isset(!$submit)) and I then get an error;
   
try

  if(!isset($submit))

instead

Tomy Wagner
Web Developer
Editus S.A.
- Original Message -
From: "Tarrant Costelloe" <[EMAIL PROTECTED]>
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(!$submit)) and I then get an error;
> Parse error: parse error, expecting `T_VARIABLE' or `'$''
> Could someone please tell me the more than likely simple sollution.
>
> Thanks
>
> Taz
>
> --
> 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]




[PHP] if(!$submit)

2001-08-07 Thread Tarrant Costelloe

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 than likely simple sollution.

Thanks

Taz

-- 
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]




Re: [PHP] if $submit

2001-05-21 Thread Markus Fischer

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 stop this warning message?

1) set new error level: error_reporting( E_ALL ^ E_NOTICE);

2) use isset()

if( isset( $submit)) { ...

3) or use @ in front of the variable

if( @$submit) { ...

- Markus

-- 
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]




Re: [PHP] if $submit

2001-05-21 Thread Plutarck

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:

error_reporting(E_ALL);

...they'll probably see a whole bunch of ugly little warnings. Useful for
debugging, annoying as all heck for production code.


Plutarck

"Tarrant Costelloe" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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-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]




Re: [PHP] if $submit

2001-05-21 Thread Plutarck

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 Costelloe" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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-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]




RE: [PHP] if $submit

2001-05-21 Thread Sandeep Hundal

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 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-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]




Re: [PHP] if $submit

2001-05-21 Thread Vitali Falileev

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 been hit, and then it continue on with the rest of the
TC> script fine ( ifelse).

TC> How do you stop this warning message?

TC> Thanks in advance!

TC> Tarrant Costelloe
TC> Web Developer
TC> InsurE-com Ltd.
TC> 
TC> Office Tel:  +44 (0)1273 852014
TC> Mobile: +44 07714087114
TC> [EMAIL PROTECTED]
TC> http://www.insur-e.net





-- 
Best regards,
 Vitalimailto:[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]




[PHP] if $submit

2001-05-21 Thread Tarrant Costelloe

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-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]




Re: [PHP] If (!$submit)

2001-05-17 Thread Plutarck

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 PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> When using:
>
>  {
> // 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]




Re: [PHP] If (!$submit)

2001-05-17 Thread bill

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 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]




[PHP] If (!$submit)

2001-05-17 Thread Tarrant Costelloe

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 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]