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:
  #1  
Old March 12th, 2004, 12:57 PM
nikolaoscy nikolaoscy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 40 nikolaoscy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
multi check box problem

i have a table in my DB called Movies that includes Title,Directror.....Category1,Category2,Category3 (a movies may be in more than one category)

i got one andim page that loads after i choose a specific movie. That pages has all categories as check boxes (about 10-15 check boxes) when it loads i want the apropriate checkboxes to checked. how i do that ?actually whats the concept?

Reply With Quote
  #2  
Old March 12th, 2004, 01:01 PM
System System is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Posts: 665 System User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Message Moved

Thread moved from 'PHP Coding' to 'Client Side Things' by codekadiya.

Reason: checkboxes are clientside

Reply With Quote
  #3  
Old March 12th, 2004, 02:33 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: multi check box problem

The concept here would be to evaluate the data that corresponds to each checkbox to determine if that checkbox was checked or not when the data was inserted into the database. For example, when diplaying the data on the screen, you would use IF statements to evaluate the value af a field retured from a query and then dynamically specify that the box should be checked. Here is a code example.

Note: since I don't have your specific code to base this off of, it will be very general...
php Code:
Original - php Code
  1.  
  2. <input type="checkbox" name="checkbox1" value="1" <?if($row["checkbox1_data"]== "1" { echo "CHECKED";}?>>


that will check the checkbox automatically if the value of the data pulled from the db is equal to the value of the checkbox. Hope that makes sense.

Reply With Quote
  #4  
Old March 15th, 2004, 02:16 PM
nikolaoscy nikolaoscy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 40 nikolaoscy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: multi check box problem

let me test that logic

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > multi check box problem


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