Posted by Serge Terryn on 12/14/06 08:49
J.O. Aho schreef:
> cerberus wrote:
>
>> What is the best method for checking the $_POST? In the first if
>> statement, or an entirely new if statement. Just curious, I'm a total
>> noob.
>
> if(!empty($_POST['id']) {
> /* do what you need to do */
> query="...
> } else {
> echo "damn, id is empty";
> }
>
> http://www.php.net/manual/en/function.empty.php
>
>
with version php4 is the stringvalue 0 (zero) empty !
so if(!empty($var) .....
wil give false if $var = 0
--
Essetee ---- Roeselare ---- Belgium
http://www.essetee.be
ICQ : 763290 -- Jabber : essetee@jabber.org
Navigation:
[Reply to this message]
|