unitedintruth wrote:wouldn't I then have to create a database field or table for each job type there is to cover any jobs that opened up. There are about 35 different jobs to be had, we average probably 10 or so open at any given time.
I cannot see your database design. What you would like to have is something like:
Table jobtypes
[id] [type_name] [... other type info]
Table open positions
[id] [type_id][... other information]
You can then query the table open position, for all open positions, and link that to the jobtypes table using a 'left join jobtypes on jobtypes.id=open_positions.type_id'
This would allow you to store as many jobtypes as you can imagine, and populate your forms and links with this info.
unitedintruth wrote:
I know this is incorrect but might give you an idea of my idea and you can tell me if it isa a no where idea at all. Again incorrect, but is there a way to make it where it would just like <a href="application.php" type="electrician"> and that would give it its job type. This way I could actually clean the form up a little also by making the "position applied for" link a hidden field?
Thanks again.
Yes there is:
$query = "select * from jobtypes";
$result = mysql_query($query) or die("Trouble is in the house:".mysql_error());
while($row = mysql_fetch_array($result))
{
echo "<a href=\"somepage.php\"?job=".$row['id']."">".$row['label']."</a>;
}
This you can of course modify, and only show open jobs, by selecting from the openjobs from the table.
You can even further expand this, byt having the openjobs table contain one colum 'open', which you can set to one or 0, so you can have all jobs stored in the database, and activate them at will.
All this is very much open to your own preference. You might not need to create a jobtype table, if you always have the same positions. But for flaxibility, I would work with seperate tables, it is just good database-design practice to avoid redundancy in your tables (e.g., multiple times having the same job type information stored if the same type of job has openings).