I am new to php. I want to insert the value selected from dropdown list in mysql database. i have two tables named tbl_user and tbl_domain. how may i storea value in tbl_domain selected from dropdown list. can any1 help me pls? here is ma code. pls tell me whats wrong wid this code? its not inserting a value in table
<label>Domain</label>
<select id = "domainList" name="domainList">
<option value = "1">Engineering</option>
<option value = "2">Medical</option>
<option value = "3">Accountancy</option></select></br>
//codeto select the value
<?php
$sql = "INSERT INTO tbl_user(first_name,last_name, sex, user_experience, user_dob)
VALUES('".$_POST[firstname]."','".$_POST[lastname]."','".$_POST[sex]."', '".$_POST[experience]."','".$_POST[dob]."' )";
$query = mysql_query($sql);
$user_id = mysql_insert_id();
$myoption = $_POST['domainList'];
$mysqlstatement = mysql_query("INSERT into tbl_domain set domain_name=".$myoption.", user_id=".$user_id."");
>