Nope not at all. Your script didnt work at all. I have a few other if(isset($__)): happening so its not bad. Its the last step in this 3 week project of mine. All I want is to get it done. I never had to make a page in PHP before and this is my first one. So I am just trying. I think someone should make a tutorial on it! 🙂 Help if you can!
Chad
HERE IS MY FULL SOURCE CODE-----
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Search Our Site</title>
</head>
<body topmargin="0" leftmargin="0">
<?php
if(isset($searchjobs)):
$db = mysql_connect("localhost");
mysql_select_db("bpa", $db);
$sql = "select from main where job_name='$job'";
$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;
?>
<?php
if(isset($searcheducation)):
$db = mysql_connect("localhost");
mysql_select_db("bpa", $db);
$sql = "select from main where education='$education'";
$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;
?>
<?php
if(isset($searchsalary)):
$db = mysql_connect("localhost");
mysql_select_db("bpa", $db);
$sql = "Select * from main where";
$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;
?>
<p align="center"><img border="0" src="searchourdb.jpg" width="174" height="44"></p>
<p align="center">Technology careers change at a growth rate which is far<br>
beyond any other field of business. Accurate information unfortunately<br>
is not found in a book but is found on the internet. Our database has<br>
been set up to give you the Category, Job Name, Education Level Needed,<br>
Salary, Ability, And a brief job description Please keep in mind that<br>
this is simply an average, the salary levels and education levels may vary<br>
upon job level.</p>
<table border="0" width="100%" height="59" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="17" background="TopNaviBackgroundBLUE.jpg" colspan="2"><b><font color="#FFFFFF">..::
Search ::..</font></b></td>
</tr>
<tr>
<td width="11%" height="108" rowspan="4"></td>
<td width="89%" height="1" bgcolor="#808080">
<form method="POST" action="search.php">
<p><font color="#FFFFFF">By Name:<select size="1" name="job">
<?php
$db = mysql_connect("localhost");
mysql_select_db("bpa", $db);
$sql = "select from main order by 'job_name'";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
include ("optiontag.inc"); printf("%s",$row["job_name"]); include ("afterinclude.inc");
printf("%s",$row["job_name"]);
print("</option>");
}
?>
</select></font><input type="submit" value="Submit" name="searchjobs"></p>
</form>
</td>
</tr>
<tr>
<td width="89%" height="1" bgcolor="#C0C0C0">
<form method="POST" action="search.php">
<p>Education Needed:<select size="1" name="education">
<option value="Out Of High School (NO COLLEGE)">Out Of High
School (NO COLLEGE)</option>
<option value="2 Years College">2 Years College</option>
<option value="4 Years College">4 Years College</option>
<option value="Masters">Masters</option>
<option value="Doctorate">Doctorate</option>
<option value="5 Years Working Experience">5 Years Working
Experience</option><input type="submit" value="Submit" name="searcheducation"></p>
</form>
</td>
</tr>
<tr>
<td width="89%" height="19" bgcolor="#808080">
<form method="POST" action="search.php">
<p><font color="#FFFFFF">Salary:</font><select size="1" name="salarycut">
<option value="<=30"><30,000</option>
<option value="select from main where salary between 31 and 50">31,000-50,000</option>
<option value="between 51 and 80">51,000-80,000</option>
<option value="between 81 and 100">81,000-100,000</option>
<option value=">=101">>101,000</option>
</select><input type="submit" value="Submit" name="searchsalary"></p>
</form>
</td>
</tr>
<tr>
<td width="89%" height="18" bgcolor="#C0C0C0">
</td>
</tr>
<tr>
<td width="100%" height="1" colspan="2" background="TopNaviBackgroundBLUE.jpg"> </td>
</tr>
</table>
</body>
---End of source code.----