php-db | 2001072
Date: 07/28/01
- Next message: sg: "[PHP-DB] MySQL newbie: inserting new entry to table?"
- Previous message: olinux: "RE: [PHP-DB] 2 Tables- 1 Insert Problem"
- Next in thread: Hugh Bothwell: "[PHP-DB] Re: Checking radio buttons for multiple records/Updating multiple records..."
- Reply: Hugh Bothwell: "[PHP-DB] Re: Checking radio buttons for multiple records/Updating multiple records..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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,
olinux
_________________________________________________________
Do You Yahoo!?
Get your free <email protected> address at http://mail.yahoo.com
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: sg: "[PHP-DB] MySQL newbie: inserting new entry to table?"
- Previous message: olinux: "RE: [PHP-DB] 2 Tables- 1 Insert Problem"
- Next in thread: Hugh Bothwell: "[PHP-DB] Re: Checking radio buttons for multiple records/Updating multiple records..."
- Reply: Hugh Bothwell: "[PHP-DB] Re: Checking radio buttons for multiple records/Updating multiple records..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

