...

View Full Version : big problem why



kamsmartx
05-08-2008, 10:25 PM
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;
}

tomws
05-08-2008, 11:57 PM
This is a javascript problem, not PHP. I can't decipher your English well enough to understand what you're saying about saving to a table somewhere.

By the way, what is a pationt?

mlseim
05-09-2008, 12:05 AM
must be "patient" as in: "The doctor's patient is here."

tomws
05-09-2008, 12:35 AM
Well, I thought that might be it, but it's even wrong as the field name in the table. I don't know why, but I suppose I place higher standards on software developers' spelling than, say, slackers hanging letters on the marquee at McDonald's.

Hoping the word is rather something from the OP's native language that doesn't translate well. Then everyone's happy.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum