Advanced Search

Results 1 to 4 of 4

Thread: Form Parsing

  1. #1
    Join Date
    Jun 2010
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Form Parsing

    I have managed to create this simple form, how do I parse info the user clicks on.

    HTML Code:
    <form id='sampleform' method='post' action='myurl.com' >
       <p>
       Name: <input type='text' name='Name' />
       </p>
       <p>
       Email: <input type='text' name='Email' />
       </p>
    <input type="radio" name="subject" value="maths" /> &pound;10
    <input type="radio" name="subject" value="physics" /> &pound;5
    <input type="radio" name="subject" value="physics" /> &pound;3
    &pound;<input type='text' name='donate-amount' />
       <p>
       <input type='submit' name='Submit' value='Submit' />
       </p>
    </form>

  2. #2
    Join Date
    Feb 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You'll need a form handler to parse the information. Do you have one currently on your website that the form action points to? (I'm presuming that myurl.com is just a placeholder and that you have something handling the form data?)

    The long and short of it is that your form handler script (typically asp, php or javascript) will get the data from your form based on the names you've given to each form field / radio button. and once it's obtained the data, you need to tell it what to do with the data (email it to someone, store it in a database, store it in a cookie, etc...)

  3. #3
    Join Date
    Jun 2010
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by robert70 View Post
    You'll need a form handler to parse the information. Do you have one currently on your website that the form action points to? (I'm presuming that myurl.com is just a placeholder and that you have something handling the form data?)

    The long and short of it is that your form handler script (typically asp, php or javascript) will get the data from your form based on the names you've given to each form field / radio button. and once it's obtained the data, you need to tell it what to do with the data (email it to someone, store it in a database, store it in a cookie, etc...)
    Thanks for this, this is a big help, i found some javascript handler code, it needs to be javascript (dont, ask long story). However this code did not work, can you suggest any?

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,626
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by jelly46 View Post
    Thanks for this, this is a big help, i found some javascript handler code, it needs to be javascript (dont, ask long story). However this code did not work, can you suggest any?
    What code? We can't help you with problems you don't describe.

    If you're limited to javascript, be aware that database (on your server) and email are out. Javascript has no access to such things. If that's what you're looking for, you'll need a server-side language.
    We Only Torture the Folks We Don't Like (You're Probably Gonna Be Okay)
    It's a Party in the CIA

Similar Threads

  1. Resolved Reading the URL and parsing it.
    By Rohan72 in forum PHP
    Replies: 7
    Last Post: 02-22-2010, 12:22 AM
  2. Parsing XML with PHP
    By teajay99 in forum PHP
    Replies: 5
    Last Post: 09-06-2009, 07:11 AM
  3. Parsing XML data with PHP
    By Spinethetic in forum PHP
    Replies: 2
    Last Post: 05-02-2008, 06:21 PM
  4. PHP Parsing Question
    By rate in forum PHP
    Replies: 4
    Last Post: 04-26-2008, 06:44 PM
  5. URL parsing in posts
    By Twey in forum The lounge
    Replies: 12
    Last Post: 05-09-2006, 05:21 PM

Bookmarks

Posting Permissions

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