Bob42
01-26-2008, 04:13 AM
I am coding a script that takes info from a database and displays it on a page. Right now there is a field in my database called "status" and I want the value in that field to be displayed in the form of radio buttons.
<input type=\"radio\" name=\"status\" value=\"{$row['status']}\" checked=\"checked\" /> Administrator
<input type=\"radio\" name=\"status\" value=\"{$row['status']}\" checked=\"checked\" /> Manager
<input type=\"radio\" name=\"status\" value=\"{$row['status']}\" checked=\"checked\" /> Moderator
So if "Administrator" is placed in the "status" field, then the Administrator button would be selected.
<input type=\"radio\" name=\"status\" value=\"{$row['status']}\" checked=\"checked\" /> Administrator
<input type=\"radio\" name=\"status\" value=\"{$row['status']}\" checked=\"checked\" /> Manager
<input type=\"radio\" name=\"status\" value=\"{$row['status']}\" checked=\"checked\" /> Moderator
So if "Administrator" is placed in the "status" field, then the Administrator button would be selected.