Hi Wade,
You do need empty() around each variable, as you can't use the boolean
operators inside that function.
However, I assume you want to return an error if any single value is empty,
as opposed to only if they are all empty. In that case you want to use ||
instead of &&:
if (empty($_POST['phhome']) || empty($_POST['phcell']) ||
empty($_POST['phwork']) ||
empty($_POST['email']))
--
katy
~~+++~~ +
no matter where you go,
there you are
+ ~~+++~~
On 6/13/06, Wade Smart <[EMAIL PROTECTED]> wrote:
>
> 06132006 1108 GMT-6
>
> Im checking to see if all of these are empty I have to do something:
>
> if (empty($_POST['phhome'] && $_POST['phcell'] && $_POST['phwork'] &&
> $_POST['email'])) {
>
> But this isnt working and putting empty() around each didnt either. What
> Im I not seeing?
>
> wade
> _
>
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Something is new at Yahoo! Groups. Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/HKFolB/TM
--------------------------------------------------------------------~->
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/