Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old February 21st, 2004, 08:32 AM
Karjol Karjol is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Bangalore
Posts: 1 Karjol User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to Karjol
Radio Button status

Hi,

I have a data base. In that is one tabale which conatib=ns the status field. In the cleint side I have different radi buttons for the different statuses. In the client I need to select the statuses. On subit this will be updated in the databases. Now My problem is like this : When I login in the client side I need to get the previously entered statuses(i.e on or off radio buttons) How can I do that? Is this possible in PHP or I need to right the java script for this? Can anybody help me.

Reply With Quote
  #2  
Old February 21st, 2004, 08:48 AM
nazly nazly is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Colombo,SriLanka
Posts: 1,325 nazly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 18 sec
Reputation Power: 3
Send a message via Yahoo to nazly
RE: Radio Button status

If the radio needs to be checked you can simply add it as 'checked' for the radio element.. I hope you will understand the below code..

Simply

php Code:
Original - php Code
  1.  
  2. $checkValue="B";//Value taken from database
  3. $chkArr=array("A"=>"","B"=>"","C"=>"");//Set all values of the radio buttons to null
  4. $chkArr[$checkValue]="checked";//Check only the radio button with thte selected value
  5.  
  6. echo "<input type="radio" name="r1" value="A" ".$chkArr["A"].">";
  7. echo "<input type="radio" name="r1" value="B" ".$chkArr["B"].">";
  8. echo "<input type="radio" name="r1" value="C" ".$chkArr["C"].">";
  9.  

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Radio Button status


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 2 hosted by Hostway