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'] ==''
?>
Did you know?Explore Trending and Topic pages for more stories like this.

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

Wierd if else problem
Hi guys,

this probably aint wierd for you, but it seems like php is playin up to me. may b i

Little problem with form insertion in MySQL, Please help!!!
Hi!,

I'm a little bit new with php and I have a little issue here. I created a webform to ins

Function to extract email attachments using PHP IMAP
function extract_attachments($connection, $message_number) {

$attachments = array();

phph within href not showing php if change ? to &
Code: [Select]<a href="<?php echo $puser; ?>?m=<?php=(($m-1)&l

listcube issue
Hi
I have a virtual cube ZREMOTE. I use Tcode "listcube" to retrieve contents. I use of the

Getting PHP to ammended the selected in option field
Hey Guys

thanks for everyones help so far. This site and its users are oozing awesomness.

Can we convert non uni code system into unicode
Hi All,

Presently i am using non-unicode system and the sap version is 4.7.
Can i c

Get word number x from string?
How can I use a function to loop through a string, and "have a look at" every word in the

cURL proxy
Okay here is the thing... i know how to add proxys

Code: curl_setopt($ch, CURLOPT_PROXYTYPE,

Content-Disposition: attachment; filename=... not working as i thought it should
taken the following code from the php.net site the script is not working.

what is not happeni

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