www.webdeveloper.com
Results 1 to 2 of 2

Thread: HTML/PHP Form Problems (need conditional statements?)

  1. #1
    Join Date
    Jan 2007
    Posts
    64

    Question HTML/PHP Form Problems (need conditional statements?)

    I'm trying to make a registration form for a family function in December. I was able to make "simple" text fields for "Name", "Email Address", etc.

    However, I'm having a MAJOR problem with part of the form. It asks how people are going to pay the registration fee: either with PayPal ("now"), or in person ("later"). The form will act differently based on their response.

    Unfortunately, I can't figure out how to set the field up. I know I want it to look like this:

    Code:
    I will pay the $20 registration fee: 
    o Now (via PayPal)
    o Later (in person)
    ...But I'm pretty sure I'll need to use some sort of script. I'm already using this PHP-based script (from FormToEmail) because it "hides" my email address from spam bots...so I hope there's a way I can alter it.

    Thanks in advance!!



    What I Want to Happen
    -If you choose "Now":
    1. Once you hit the Submit button, you'll be taken to "Thank You Page #1". This page will thank you for registering and after 15 seconds, it will load our PayPal page (in a new, popup window)

    2. Your form will be emailed to me, with the following subject line: "[FORM] December 2009"



    -If you choose "Later":
    1. You also MUST say "yes" to our "Agreement", which says that PayPal payments are given top priority, etc. This agreement uses a checkbox, and looks like this:
    Code:
    [ ] Yes, I accept the above agreement.
    2. If you do NOT check the box, then the form will not process.

    3. Once you check "yes" and hit the Submit button, the form will process and they'll be taken to "Thank You Page #2". Here, we'll thank them for registering, and provide a copy of the agreement (which they can print).

    4. Your form will be emailed to me, with the following subject line: "[FORM - In Person] December 2009"
    =================================================================
    =================================================================
    General Questions (about the PHP script)
    FormToEmail's website said I had to put the script on my server. Should it be placed in my root directory, or in the exact directory my form is?

    If my site is www.HappyDay.com, but the form is located at www.HappyDay.com/Family/Register/Dec2009.html ... should the script go inside the Register/ directory, the Family/ directory, or the root directory (www.HappyDay.com)?


    Can I put multiple versions of this script on my site? I'm sure there will be more functions in the future, and 3-4 different forms might be available on the site. I'm not sure if using multiple scripts would drain my server, or cause some sort of problem...so I thought I'd ask.

  2. #2
    Join Date
    Jun 2009
    Posts
    111
    Quote Originally Posted by just_bri View Post
    FormToEmail's website said I had to put the script on my server. Should it be placed in my root directory, or in the exact directory my form is?

    If my site is www.HappyDay.com, but the form is located at www.HappyDay.com/Family/Register/Dec2009.html ... should the script go inside the Register/ directory, the Family/ directory, or the root directory (www.HappyDay.com)?
    Place it wherever your form's ACTION links to... and remember it's reletave to where the form is located.


    Can I put multiple versions of this script on my site? I'm sure there will be more functions in the future, and 3-4 different forms might be available on the site. I'm not sure if using multiple scripts would drain my server, or cause some sort of problem...so I thought I'd ask.
    While using multiple scripts wouldn't likely cause any problems, it's also not really necessary. If all of your forms are doing more or less the same thing, you can use the same script for all instances.

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