Jeremy:
Have you tried echoing your $sql variable to ensure it has in it what
you expect? In other words, does $PHP_AUTH_USER have the value you need
it to have?
hth
Happy programming!
Chris Mulcahy
-Original Message-
From: Jeremy Morano [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 04, 2001 2:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] option block
Hello everyone, I'm having a problem with my option block...
I'm trying to
pass the value of uid to the next page. I always get the last
uid value in
table user. How can I change this so I get to pass the value
of the user's
choice?
$sql = SELECT user.uid, user.first_name, user.last_name
FROM user, company
Where company.uid = user.companyUid and company.company
= '$PHP_AUTH_USER'
ORDER BY last_name
;
$result = @mysql_query($sql,$connection) or die(Couldn't
execute query.);
while ($row = mysql_fetch_array($result)) {
$uid = $row['uid'];
$first_name = $row['first_name'];
$last_name = $row['last_name'];
$option_block .= option value=\$uid\$last_name,
$first_name/option;
}
$display_block =
FORM METHOD=\post\ ACTION=\show_moduser.php\
PstrongUser:/strong
select name=\uid\
$option_block
/select
INPUT TYPE=\SUBMIT\ NAME=\submit\ VALUE=\Select this User\/P
/form
;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail:
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]