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

rdns with php
I am trying to build a script that will show all of the different domains that are hosted on the sam

Results from Db outputted twice
Hey guys.. for come reason my data is outputted twise shown in the image below and i cant figure out

how to get sn motherboard
Hello.
I want to get serial number motherboard, cpu and else hardware.
Can You show me sam

.htpasswd Registration Form
Hi,
I wanted to make an htpasswd registration form.
I found this code on the internet but have

type check while uploading
Hi Everyone,

How can I check the exact type of a file while uploading on my site?

Here

My XSRF Prevention code isn't working
First of all, thanks for the generous help you guys have given me in the past on this forum.
Seco

How to convert this array to string
I am having problems converting this array to a string
using print_r($val[1]); I get:
Code: [

Please help - should be a simple fix.. driving me nuts
Everything seemed to be working fine. I have a table, it alphabetically lists a bunch of cities and

On page view, minus credit
Hello all, please, I need a little help with this script. I am charging one credit (credits can be p

Edit MySQL Row Using PHP and HTML Form
Hello,

Here's what I'm trying to do. Build a page where a user enters a MySQL row number in.

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