< php? how to display selection?

Just_DO_it

New member
hey there ,

I have .htm form that contains three drop-down boxs ,, and the method =get

1-country
2-city
3-gender

if I select from USA drop-down box country ,city =all ,gender =all , will post all (names : ( both females and males)) in USA in all cities and all genders ,

if I slelect USA , LA from city ,and female from gender ,,,, will give me all female names in USA in LA .

and should count how many names got ,and number of pages resualt speard in with pev and next resualt .

if i select wrong selection result will be nothing
like USA ,Paris


its simple but because am new in PHP .

what I did I cannot even got the selected data .


html.

method = get

/html



php code



<?php


include('conit.php');


$city=$_get["city"];
$country=$_get["county"];
$gender=$_get["gender"];

$result = mysql_query("SELECT (city,country,gender) * FROM users WHERE (city = '$city'),(country='$country'),(gender='$gender')");


while($row = mysql_fetch_array($result))
{
echo $row['name'];
echo "<br />";
echo $row['gender'];
echo "<br />";
echo $row['city'];
echo "<br />";
echo $row['country'];
}


?>



thank you in advance
 
Back
Top