MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old September 22nd, 2003, 12:23 AM
kubendran kubendran is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 9 kubendran User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 15 sec
Reputation Power: 0
Post updating information in php &mysql

Dear all,


I am using php & mysql. In this concept, How to update a group

of radio buttons & check boxes .

i.e, how to set a radio button or check box will be automatically

checked while retrieving the data.


anybody help me

Reply With Quote
  #2  
Old September 22nd, 2003, 04:00 AM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 5
I'm not entirely sure what it is you want to do but the following will hopefully push you in the right direction.

Lets say you have a database table containing names to go against the checkboxes and then another column containing either 1 or 0 (for checked or not checked respectively).

Once you have queried the table you can produce the check boxes as follows -

PHP Code:
while (get results from query)
{
  echo 
'<input type="checkbox" name="' $result->name '" ';

  if (
$result->checked == 1)
    echo 
'checked="checked" ';

  echo 
'/>' $result->name '<br />';


Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > updating information in php &mysql


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway