[PHP] simple ereg() question

2003-07-08 Thread gamin
Hi, How do i check with ereg() is a string is non-empty (!== '') Thx G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] simple ereg question

2003-02-23 Thread Robert E. Harvey, M.D.
Ernest E Vogelsinger wrote: At 01:01 24.02.2003, Robert E. Harvey, M.D. said: [snip] if (is_numeric($_POST["gamt_$i"]) or empty($_POST"gamt_$i")) or this: if (is_numeric($_POST["gamt_$i"]) || empty($_POST"gamt_$i")) I get this error message (my if stat

Re: [PHP] simple ereg question

2003-02-23 Thread Ernest E Vogelsinger
At 01:01 24.02.2003, Robert E. Harvey, M.D. said: [snip] > if (is_numeric($_POST["gamt_$i"]) or empty($_POST"gamt_$i")) > >or this: > > if (is_numeric($_POST["gamt_$i"]) || empty($_POST"gamt_$i")) > >I get this error message (my if statement is on line 5): >

Re: [PHP] simple ereg question

2003-02-23 Thread Robert E. Harvey, M.D.
John W. Holmes wrote: I'd like to verify input data transferred from a form and make sure it is numeric data or null before my program executes. I am using this syntax, which doesn't work: for ($i=1;$i<=3;$i++) { if (ereg('[0-9]+','$_POST["gamt_$i"]')) { continue; } else { die("Non-nu

RE: [PHP] simple ereg question

2003-02-20 Thread John W. Holmes
> I'd like to verify input data transferred from a form and make sure it > is numeric data or null before my program executes. I am using this > syntax, which doesn't work: > > for ($i=1;$i<=3;$i++) > { > if (ereg('[0-9]+','$_POST["gamt_$i"]')) > { >continue; > } > else > { >

Re: [PHP] simple ereg question

2003-02-20 Thread Leif K-Brooks
Change to:No, the double quotes are needed so that $i will be parsed. The problem is the single quotes around $_POST["gamt_$i"]. if (ereg('[0-9]+',$_POST["gamt_$i"]) Greg Donald wrote: On Thu, 20 Feb 2003, Robert E. Harvey, M.D. wrote: I'd like to verify input data transferred from a form

RE: [PHP] simple ereg question

2003-02-20 Thread Kelly Protsko
bruary 20, 2003 12:34 PM To: php; Robert Harvey Subject: [PHP] simple ereg question Hello folks, I'd like to verify input data transferred from a form and make sure it is numeric data or null before my program executes. I am using this syntax, which doesn't work: for ($i=1;

Re: [PHP] simple ereg question

2003-02-20 Thread Greg Donald
On Thu, 20 Feb 2003, Robert E. Harvey, M.D. wrote: >I'd like to verify input data transferred from a form and make sure it >is numeric data or null before my program executes. I am using this >syntax, which doesn't work: > >for ($i=1;$i<=3;$i++) >{ > if (ereg('[0-9]+','$_POST["gamt_$i"]')) > {

[PHP] simple ereg question

2003-02-20 Thread Robert E. Harvey, M.D.
Hello folks, I'd like to verify input data transferred from a form and make sure it is numeric data or null before my program executes. I am using this syntax, which doesn't work: for ($i=1;$i<=3;$i++) { if (ereg('[0-9]+','$_POST["gamt_$i"]')) { continue; } else { die("Non-numeric

RE: [PHP] Simple ereg question

2003-02-19 Thread Kelly Protsko
"]) || $_POST["gamt_$i"] == null){ } Kelly -Original Message- From: Robert E. Harvey, M.D. [mailto:[EMAIL PROTECTED]] Sent: February 19, 2003 6:54 PM To: php Subject: [PHP] Simple ereg question Hello folks, I'd like to verify input data transferred from a form a

[PHP] Simple ereg question

2003-02-19 Thread Robert E. Harvey, M.D.
Hello folks, I'd like to verify input data transferred from a form and make sure it is numeric data or null before my program executes. I am using this syntax, which doesn't work: for ($i=1;$i<=3;$i++) { if (ereg('[0-9]+','$_POST["gamt_$i"]')) { continue; } else { die("Non-n