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:
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 February 2nd, 2004, 06:49 PM
tpirmann tpirmann is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Willow Grove, PA, USA
Posts: 27 tpirmann 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 tpirmann
Radio AND text?

I have a question on a form that goes like this:

Location:
0 On-site or Off-site ________

I have it set up with on-site as a radio button and off-site as a text field. I have PHP checking for inputs in each field and if I choose on-site, then the PHP kicks it back as not filled out.

Am I doing something wrong or is there a better way to do this?

Thanks

Reply With Quote
  #2  
Old February 2nd, 2004, 11:50 PM
CodeKadiya CodeKadiya is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,313 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to CodeKadiya
RE: Radio AND text?

Ok, can we know how you check whether user filled form or not?

Reply With Quote
  #3  
Old February 3rd, 2004, 11:41 AM
tpirmann tpirmann is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Willow Grove, PA, USA
Posts: 27 tpirmann 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 tpirmann
RE: Radio AND text?

Here's the validation.

php Code:
Original - php Code
  1.  
  2. //create short variable names
  3. $program=$HTTP_POST_VARS['program'];
  4. $location=$HTTP_POST_VARS['location'];
  5. $participation=$HTTP_POST_VARS['participation'];
  6. $type=$HTTP_POST_VARS['type'];
  7. $reason=$HTTP_POST_VARS['reason'];
  8. $tpoeo=$HTTP_POST_VARS['tpoeo'];
  9. $outcome=$HTTP_POST_VARS['outcome'];
  10. $duration=$HTTP_POST_VARS['duration'];
  11. $startdate=$HTTP_POST_VARS['startdate'];
  12. $startdate=date("Y-m-d");
  13.  
  14. if (!$program || !$location || !$participation || !$type || !$reason || !$tpoeo || !$outcome || !$duration || !$startdate)
  15. {
  16. echo 'You have not completely filled out the form. Use the browsers back button and try again.';
  17. }

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Radio AND text?


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