Ok, here is what I am trying to do. I know that it is very common.

Simplified: I have a tabble of users with an AUTHORIZE field [type ENUM -
Yes or No]. They sign up and once I authorize them. I pull up all of the
records and display them something like this:

User Name -  Authorize: [] Yes [] No

So i run my select thru a while loop and end up with

User Name -  Authorize: [] Yes [] No
User2 Name -  Authorize: [] Yes [] No
User3 Name -  Authorize: [] Yes [] No
User4 Name -  Authorize: [] Yes [] No

The settings already in the database should show. So that either Yes or No
is checked for each user.

so here is the code I use:

if ($authorize == "Y") { $chk_authorize = "Authorized: <input type=\"radio\"
name=\"authorize\" value=\"Y\" checked>Yes <input type=\"radio\"
name=\"authorize\" value=\"N\">No"; } else { $chk_authorize = "Authorized:
<input type=\"radio\" name=\"authorize\" value=\"Y\">Yes <input
type=\"radio\" name=\"authorize\" value=\"N\" checked>No"; }

This works EXCEPT only the last field displays a checked radio button
[because the names are all the same.

How can do this so that each record displays current authorization setting?

After this I need to be able to SUBMIT the info to UPDATE the table.

I understand that I will have to execute a number of update statements ...
But how can I create these statements that tie the correct username and
AUTHORIZE value together?

thanks much,

Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

PHP Database 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]

Reply via email to