Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Show content based on 2 Recordset conditions

Posted on 2013-06-27
1
Medium Priority
?
186 Views
Last Modified: 2013-07-03
I'm showing content based on 'choose' being the value from the 'type' column of Recordset1 using this...

<?php if (!(strcmp("choose", $row_Recordset1['type']))): ?>

How do I add another condition? So the content would show if 'choose' being the value from the 'type' column of Recordset1 and if 'yes' being the value from the 'postcodecheck' column of Recordset2

So in theory....

<?php if (!(strcmp("choose", $row_Recordset1['type']))): &  if (!(strcmp("yes", $row_Recordset2['postcodecheck']))): ?>
0
Comment
Question by:BrighteyesDesign
1 Comment
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 39282794
<?php 
if (!strcmp("choose", $row_Recordset1['type']) && !strcmp("yes", $row_Recordset2['postcodecheck']))
{
...
} 
?>

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question