dstratford
asked on
PHP query posts array
I have a search form which brings in 3 variables. The 3 variables correspond to custom fields in each post of a specific category. How can i get this query to show results matching ALL variables, instead of either of the three?
<?php
$type = $_POST["type"];
$price = $_POST["price"];
$location = $_POST["location"];
$args = array(
'cat' => 16,
'meta_value' => $type,
'meta_value' => $price,
'meta_value' => $location,
);
query_posts($args);
?>
<?php
$type = $_POST["type"];
$price = $_POST["price"];
$location = $_POST["location"];
$args = array(
'cat' => 16,
'meta_value' => $type,
'meta_value' => $price,
'meta_value' => $location,
);
query_posts($args);
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER