have trouble in a if condition


Posted on 16th Feb 2014 07:03 pm by admin

The if below is working ok, it check when indexes, name, zipcode and state are empty.
Code: <?php
if ( trim($_POST['name']) == '' && $_POST['zipcode'] =='' && $_POST['state'] ==''
?>

But when it comes to check the array types I don't know how to structure in a way that it checks weather is empty or not. I did it as below and it fails the test. How can I insert the types index array and check when is empty? empty meaning when there is not value remembering that it is an array now.

Code: if ( trim($_POST['name']) == '' && $_POST['zipcode'] =='' && $_POST['state'] =='' && isset($_POST['frmSearch']['types']) )
{ this}
else
{that}
?>

No comments posted yet

Your Answer:

Login to answer
292 Like 43 Dislike
Previous forums Next forums
Other forums

Working with Global Variables
hi, I'm not really sure why the following code is returning a "Call to a member function getBan

Pagination
Hi All,

I think I'm finally getting somewhere with pagination!

I can now submit a quer

my sql select id and then update problem.
I need to select some auto incremented ids out of a database and then use those id in a where statem

HTML form problem
Ive made a form to that i want to send to my email via PHP. but when it send only the name's etc sen

big pagination problem in php
<?php

$connect = mysql_connect("localhost", "root", "")

C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.
What libr

WORDPRESS - Multiple Loops Only Going to One Post?
I have various pages with multiple loops and i need them to be individual to all other categories.

dinamic "textboxes"?
Ey all, my first post here, i hope its not a hard one

I display mysql results in a table

CODE NOT WORKING
Code: [Select]<?php
//include shared codes

include '../lib/common.php';
include

Troubles with a spider class
I am building a spider that will crawl through random whitepages (eg. anywho.com, switchboard.com, w

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash