Basically, all I want to do is, one 1 page, have a listing of jobs for our HR admin. Switch Default shows something like so:
Choose your path:
Jobs
Whatever
When they choose 'jobs', it should take you to 'jobslisting' switch statement. Once there, you would see:
Java Programmer
Web Developer
... in hrefs, based on ID. In same page, clicking on Java Programmer link would take you to 'jobsindivid', the information about that individual position.
Title: Java Programmer
Positions Available: 3
etc.
Basic switch code below:
$link = mysql_connect("localhost", "mysqluser", "mysqlpassword")
or die("Could not connect: " . mysql_error());
mysql_select_db("dbname");
switch ($goto)
{
case "jobslisting":
$result_jobslisting = mysql_query("SELECT * FROM jobs");
while ($row = mysql_fetch_array($result_jobslisting, MYSQL_ASSOC)) {
echo '<form name="go" action="$PHP_SELF?goto=jobsindivid&id=$_GET[id]" method="get">';
echo '<a href="';
echo $PHP_SELF;
echo "?goto=jobsindivid";
//echo $row[id];
echo '">';
echo $row[Title];
echo '</a><BR>';
echo "</form>";
}
break;
case "jobsindivid":
$result_jobsindivid = mysql_query("SELECT * FROM jobs where id=$row[id]");
//echo $result_jobsindivid;
while ($row = mysql_fetch_array($result_jobsindivid, MYSQL_ASSOC)) {
echo "Test";
?>
<!-- JOBS -->
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bodytext">
<tr bgcolor="#0099CC">
<td height="21" colspan="2" bgcolor="#996600"><font face="Arial, Helvetica, sans-serif" color="#FFFFFF" size="2"><b><?php echo $row['Title']; ?></b></font></td>
</tr>
<tr>
<td width="25%" height="21">Location: </td>
<td width="71%" height="21">
<?php echo $row['Location']; ?>
</td>
</tr>
<tr>
<td width="25%" height="21">Duration: </td>
<td width="71%" height="21">
<?php echo $row['Duration']; ?>
</td>
</tr>
<tr>
<td width="25%" height="21">Positions: </td>
<td width="71%" height="21">
<?php echo $row['Positions']; ?>
</td>
</tr>
<tr>
<td width="25%" height="21">Interview:</td>
<td width="71%" height="21">
<?php echo $row['Interview']; ?>
</td>
</tr>
<tr>
<td width="25%" height="21">Work Status: </td>
<td width="71%" height="21">
<?php echo $row['WorkStatus']; ?>
</td>
</tr>
<tr>
<td width="25%" height="21">Requirement:</td>
<td width="71%" height="21">
<?php echo $row['Requirement']; ?>
</td>
</tr>
<tr>
<td width="25%" height="21">Must have:</td>
<td width="71%" height="21">
<?php echo $row['MustHave']; ?>
</td>
</tr>
<tr>
<td width="25%" height="21">Huge Plus:</td>
<td width="71%" height="21">
<?php echo $row['HugePlus']; ?>
</td>
</tr>
<tr>
<td width="25%" height="21">Project:</td>
<td width="71%" height="21">
<?php echo $row['Project']; ?>
</td>
</tr>
<tr>
<td width="25%" height="21">Responsibilities:</td>
<td width="71%" height="21">
<?php echo $row['Responsibilities']; ?>
</td>
</tr>
<tr>
<td width="25%" height="21"> </td>
<td width="71%" height="21"><B><font size="2" face="Arial"><a href="javascript:window.close();">Apply
Now</a></font></b></td>
</tr>
</table>
<BR>
<?
}
break;
default:
?>
<p>HR ADMIN PAGE </p>
<p><a href="index.php?goto=jobslisting">Jobs</a></p>
<?
}