I've been searchin the web a lot, not really finding what i need.. but i changed the code to this: but still doesn't work.. any1 can help?
I think the part where i set the nummer value is not correct... or something..
<?
echo "<FORM METHOD=\"post\" ACTION=\"$_SERVER[PHP_SELF]\" NAME=\"test\">\n";
$vl="";
if(isset($POST['naam']))
{
$vl=$POST['naam'];
$sql="select nummer from members where naam='$vl'";
$rs=mysql_query($sql);
}
?>
<script>
function resubmit()
{
document.test.action="cijfers.php"
// document.test.submit()
test.nummer.value=$nummer
}
</script>
<?
echo 'Naam: <SELECT NAME="naam" size="1" onChange="resubmit()">';
$result = mysql_query("SELECT naam FROM members ORDER BY naam ASC");
while($row = mysql_fetch_array($result)) {
/* laat items zien */
echo '<OPTION VALUE="' . $row['naam']. ' ">' . $row['naam'] .'</OPTION>';
}
echo "</SELECT><BR><BR>";
if($vl!="")
{
$row=mysql_fetch_row($rs);
$row->nummer = $nummer;
echo "Nummer: <INPUT TYPE=\"text\" NAME=\"nummer\" VALUE=\"$nummer\" SIZE=\"10\" MAXLENGTH=\"10\" DISABLED><BR><BR>\n";
}