i have this code
this pages makes a drop down menu with the options...
<select size="1" name="main_comp_id" style="font-family:Verdana; font-size:10pt">
<option value""> ------- SELECT ------- </option>
<?php
mysql_connect (localhost, user, pass);
mysql_select_db (table);
$result2 = mysql_query ("SELECT * From results_comp order by comp_name");
while ($row2 = mysql_fetch_array($result2)) {
$comp_id = $row2["comp_id"];
$comp_name = $row2["comp_name"];
?>
<option value"<?php echo $row2["comp_id"]; ?>"></b>
<font face="Verdana" size="2"><?php echo $row2["comp_name"]; ?></option>
<?php
}
?>
</select></font></p>
this code should add the id of the main_comp_id into my database but it does not add.... why? does anyone know?
<?php
$result = mysql_query ("INSERT INTO results_comp_run (`comp_run_id`,`main_comp_id`,`season`,`bye_exists`,`bye_pts_value`,`table_exists`,`latest_round`,`points_win_value`,`points_draw_value`,`table_misc`,`latest_round2`) Values ('','$main_comp_id','$season','$bye_exists','$bye_pts_value','$table_exists','$latest_round','$points_win_value','$points_draw_value','$table_misc','$latest_round2')") or die("INSERT error: ".mysql_error());
?>