I have this code and it spits out an Error. Can anyone shed some light?
<head>
</head>
<body>
<?php
if(isset($searchsalary)):
$db = mysql_connect("localhost");
mysql_select_db("bpa", $db);
$sql = "select * from main where salary '$salary2'";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
include ("underbody.inc");
include ("widthin.inc"); printf("<b>Job Name:</b> %s<hr></td>\n",$row["job_name"]);
include ("underjobname.inc");
include ("widthin.inc"); printf("<b>Education Needed:</b> %s<hr>\n",$row["education"]);
printf("<b>Salary With College:</b> %s,000<hr>\n",$row["salary"]);
printf("<b>Rank:</b> %s<hr>\n",$row["rank"]);
printf("<b>Abilities Needed:</b> %s<hr>\n",$row["ability"]);
printf("<b>Job Description:</b> %s<hr>\n",$row["job_desc"]);
printf("<b>Other Information:</b> %s<hr></td>\n",$row["other"]);
include ("fotter.inc");
print("<p>");
}
endif;
?>
<form method="POST" action="search.php">
<p><font color="#FFFFFF">Salary:</font><select size="1" name="salary2">
<option value="<=30"><30,000</option>
<option value=">=31 and salary <=50">31,000-50,000</option>
<option value=">=51 and salary <=80">51,000-80,000</option>
<option value=">=81 and salary <=100">81,000-100,000</option>
<option value=">=101">>101,000</option>
</select><input type="submit" value="Submit" name="searchsalary"></p>
</form>
</body>
So can anyone find the error? I had some help earlier and it worked in the mysql.exe but not on the actual server. So can someone help me please???
Thanks!
Chad R. Smith