Hi all
I cannot remeber how to do this
I have two fields module_id and name.
module_id is a number
name is the description of the module
I have a form that calls a php code to insert a row into a table. here is the code:
// create SQL statement
$sql = "select module_id, name from modules order by module_id";
// execute SQL query and get result
$sql_result = mysql_query($sql,$mysql_db_conn) or die("Couldn't execute query.");
// put data into drop-down list box
while ($row = mysql_fetch_array($sql_result)) {
$name = $row["name"];
$id = $row["module_id"];
$option_block .= "<OPTION>$name</OPTION>\n";
}
I want the user to see the name field in the select list (which works just fine as above) but I want to send the module_id to the php code.
I cannot remenber how to embed the value.
Anyone know?
Russ