Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Feb 2004
    Posts
    4
    Member #
    4811
    Hi everyone. I'm new to this board. I was wondering if someone could help me. I want a form on my website where the user can tick "tick" boxes or radio buttons, and then click a button that DOES NOT send the results to an email address, but either prints ONLY the items ticked, or sends them to another page with the results of only the ticked boxes. This sounds easy enough, but I can't work it out!

    It's important that I do not want to use CGI. Also note, I don't want to use excel or access either. I heard somehwere that XML might be the way to go.

    Anyway, I would soooo appreciate any help you can give!

  2.  

  3. #2
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    138 times
    So basically you want a form that has radio buttons or check boxes. When the user selects whatever and hits submit, it will then print only the ones selected on the screen correct? If so, it's allllll PHP baby! Actually, you probably could do it with javascript, but I'm currently using PHP for it. The only PHP part is printing out the value, but I can't remember how to do it with just HTML Check this code out (untested), it should work:

    Code:
    <TABLE BORDER="0" WIDTH="700"><TD>
    <FIELDSET>
    <LEGEND><b>Please select a some stuff:</b></LEGEND>
    <form action="print_page.php" method="POST" name="Table_List">
    <table border="0">
      <tr>
        <td>
          <tr><input name="selection" value="value1" type="radio">name1</tr>
          <tr><input name="selection" value="value2" type="radio">name2</tr>
          <tr><input name="selection" value="value3" type="radio">name3</tr>
       </td>
      </tr>
    </table>
    <input name="Submit" type="submit" value="Submit">
    </form>
    </FIELDSET>
    </TD></TABLE>
    print_page.php:
    Code:
    <? 
    $selection = $_POST["selection"];
    echo "Here is what you selected: " . $selection . " \n <br>";
    ?>
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  4. #3
    Junior Member
    Join Date
    Feb 2004
    Posts
    4
    Member #
    4811
    Thanks for that. Its going to the print_page,php okay but not producing anything - just a blank page. Also I need people to be able to select more than one radio button, but I think I know how to create that option.

  5. #4
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    138 times
    Radio buttons are for only one selection. Check boxes are for more than one selection.

    I made a boo-boo, it should be:
    print_page.php:
    Code:
    <? 
    $value = $_POST["value"];
    echo "Here is what you selected: " . $value . " \n <br>";
    ?>
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  6. #5
    Junior Member
    Join Date
    Feb 2004
    Posts
    4
    Member #
    4811
    Ecuse my ignorance but do you have to have these files on a server that accepts PHP, or will they work on any server? Sorry about all the questions!

  7. #6
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    138 times
    Yes, the server needs to support PHP.
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:27 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com