I have 3 tables:
departments - depID, departments, dep_number
positions - posID, depID, title, experience, hours, description, publishdate
application - appID, first_name, middle_name, last_name, address, city, state, zip, position_apply, position_type, ...etc
I am using a dropdown to pull the open positions into an application form and when submitted
putting the position_apply (position.title) into the application table:
Code: Select all
<?php
include ('app_inc_fns.php');
$conn = db_connect();
echo "<select name='position_apply'>"; //Start selection box
$query = mysql_query("select * from positions");
while($rows = @mysql_fetch_array($query)) {
echo "<option value="$rows[title]">$rows[title]</option>";
}
echo "</select>";
?>What I would like to do, is also pull the dep_number via a hidden field in the application form
and submit to the application table (position_type).
Code: Select all
<?php
"<input type="hidden" name="position_type" value=$dep_number>";
?>Help would be appreciated...
Thanks,
--Melinda