hi all
i have this code
<select name="Number" onChange="change_title(this.value);">
<?
$query="SELECT * FROM pationt";
$result=mysql_query($query) or die("error: " . mysql_error());
while($row=mysql_fetch_array($result))
{
?>
<option value="<?php echo $row['name'] ; ?>"><?php echo $row['Number'] ; ?></option>
<?
}
?>
</select>
this code is get the Number of pationt from table on data base called pationt
..ok
=====
then on this code
<input name="Name" type="text" id="title"/>
print the name of pationt that selected from above code
but the problem is when i press ok button to save this operation on other table we save only Number of pation on two filed "pationtNO , PationtName"
why
ya this is the javascript
function change_title(ref)
{
document.getElementById('title').value = ref;
}