Hello, I'm new to php, I'm working on a website for employment. I want user to be able to pull data from mysql by using selection from drop down menu. I have a table call jobs, inside this table there are 5 columns: JobType, Place, Wage, Phone, Date. I created the drop down menu and the php filter code (not sure if i'm coding it right).
But went I run it on IE, the page just refresh. It didn't echo anything on the page. Here is my code...... Please Help!!!
// THIS IS IN THE SELECTION PAGE
<form action="selectform.php" method="POST">
<select name="jobselect">
<option value="" selected="selected">All Jobs</option>
<option value="Cook1">1st Cook</option>
<option value="Cook2">2nd Cook</option>
<option value="Helper">Kitchen Helper</option>
<option value="Bagger">Bagger</option>
<option value="DishWasher">Dish Washer</option>
<option value="Hostress">Hostress</option>
<option value="Waiter">Waiter</option>
<option value="Waitress">Waitress</option>
<option value="BusBoy">Bus Boy</option>
<option value="Fryer">Deep Fryer</option>
<option value="Cashier">Cashier</option>
<option value="Driver">Driver</option>
</select>
<input type="Submit" value="Submit" name="Submit">
</form>
// THIS IS IN THE FILTERED PAGE
<?php
mysql_connect ("localhost","root") or die (mysql_error()); mysql_select_db ("nindu") or die (mysql_error());
?>
<?php
$Job = isset($_POST["jobselect"]);
$Query = "SELECT * FROM jobs WHERE JobType='$Job'";
//RUN THE QUERY
$result = mysql_query($Query) or die (mysql_error());
while ($row = mysql_fetch_array($result)) {
echo "<br />";
echo $row['JobType'] . "-" . $row['Place'] . "-" .
$row['Wage'] . "-" . $row['Phone'] . "-" .
$row['Date'];
echo "<br />";
}
?>