RE: [PHP-WIN] HELP - problems with mysql and select .
| From: | Rich Gray | Date: | Tue, 12 Nov 2002 16:35:32 +0000 |
| Subject: | RE: [PHP-WIN] HELP - problems with mysql and select . | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-16890@lists.php.net to get a copy of this message | ||
I'm not sure what you are talking about here so I will have to guess...
If by JAVA you mean javascript, well that operates client side and it cannot
directly interact with a server side PHP script which has finished execution
by the time the page is displayed.
If you are trying to display data when the user clicks on a form object then
I would look into using DHTML or CSS to unhide a previously populated but
hidden div/layer. Alternatively javascript can open another window, or have
the form re-submit with different parameters - naturally the latter 2 will
involve another round trip to the server....
HTH
Rich
-----Original Message-----
From: A. Mikkelsen [mailto:a__mikkelsen@hotmail.com]
Sent: 12 November 2002 12:41
To: php-windows@lists.php.net
Subject: [PHP-WIN] HELP - problems with mysql and select .
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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php