www.webdeveloper.com
Results 1 to 3 of 3

Thread: Need HELP PLEASE

  1. #1
    Join Date
    Dec 2002
    Posts
    131

    Need HELP PLEASE

    Hi all

    I trying to creat a form with for radio buttons

    if the user selects radio button 1 or 2 then they are asked to discribe in more deatle in a textarea if they select radio 3 or 4 then they dont have to

    here is the problem this information needs to be added to a db??

    anyideas???????????????????

    Thanks Redhead
    redhead

  2. #2
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    Well, if you've got everything done except for adding to a database, then there shouldn't be much of a problem--it's not hard to connect to a DB usually. What database are you using? MySQL?

    [J]ona
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

  3. #3
    Join Date
    May 2003
    Posts
    225
    well, your first line of defence would be javascript. NEVER trust this entirely, though. It is just so your users don't need to reload the page if they get it wrong. Than you would do somthing like this(I have not tested this code ):
    PHP Code:
    <?php
    if(isset($HTTP_POST_VARS['radio1'])){ // the isset function checks to see if the variable "radio1" is set
    if($HTTP_POST_VARS['radio1']=='yes'){
    if{
    $HTTP_POST_VARS['write_here']!=''){
    //submission script here
    }else{echo "if you ticked the \"yes\" button, you need to fill out some info!";}
    }
    }
    ?>
    But, like jona said, what type of submission are you using?
    We could drive you a little less crazy if you told me

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles