HELP - problems with mysql and select .
| From: | A. Mikkelsen | Date: | Tue, 12 Nov 2002 12:40:43 +0000 |
| Subject: | HELP - problems with mysql and select . | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-16885@lists.php.net to get a copy of this message | ||
Hey.
I'm trying to make a page with a dropdown (data from MYSQL) where I with a
click on the choosen line get the information an the user in a table beneth.
The dropdown box works, but the click part and the java part doesn't...
Can anyone help ????
JAVA Function :
function show()
{
show_list = 1;
}
CODE :
<TR>
<TD COLSPAN="2">
<FORM METHOD = "post" NAME="update_user" ACTION = "<? echo
$PHP_SELF ?>">
<INPUT TYPE="Hidden" NAME="action" VALUE="show_users">
<SELECT NAME="wm_id" SIZE="6" STYLE="width=205px">
<?php
$show_list = 0;
$user_list = generate_user_id_list();
For ($i=0; $i < sizeof($user_list); $i++)
{
echo "<OPTION VALUE=".$user_list[$i]['wm_id']."
onClick=show()>".$user_list[$i]['wm_id']." -
".$user_list[$i]['f_name']."
".$user_list[$i]['l_name']."</OPTION>";
}
?>
</TD>
</TR>
<TR>
<TD>
<br>
<br>
<br>
<INPUT TYPE="Submit" VALUE="View user" SIZE="10"
onClick="show()">
</TD>
</TR>
<TR>
<TD>
<?php
IF (!$show_list == 0)
{
echo "<br><br><br><br>TEST";
}
?>
</TD>
</TR>
//A. Mikkelsen