Results 1 to 9 of 9

Thread: Need Form Help, please
      
   

  1. #1
    Bird's Avatar
    Bird is offline Captain
    Join Date
    Oct 2005
    Posts
    202

    Question Need Form Help, please

    I have made a second form for my website.
    http://www.fromtheheartofangels.com/signatures.html

    Made the confirmation2.html page, and used notepad for the confirmation.php. Also made my error pages.

    When I click on order, then submit, it will go to the style error page, I go back and choose the style, then submit again, it doesn't change, its still stuck on style, and will not go any further.

    What am I doing wrong here? I must be missing something! LOL

    style_errorpage2.html
    size_errorpage2.html
    text_errorpage2.html
    signature_name_errorpage2.html
    email_errorpage2.html

    The script I used is>>

    <?php
    if($_SERVER['HTTP_REFERER'] == "http://www.fromtheheartofangels.com/...orderform.html")
    {
    // Receiving variables from the form
    @$style = addslashes($_POST['style']);
    @$size = addslashes($_POST['size']);
    @$text_font = addslashes($_POST['text_font']);
    @$signature_name = addslashes($_POST['signature_name']);
    @$email = addslashes($_POST['email']);
    @$comments = addslashes($_POST['comments']);
    // Validation for empty fields and email
    if (strlen($style) == 0 )
    {
    header("Location: style_errorpage2.html");
    exit;
    }
    if (strlen($size) == 0 )
    {
    header("Location: size_errorpage2.html");
    exit;
    }
    if (strlen($text_font) == 0 )
    {
    header("Location: text_errorpage2.html");
    exit;
    }
    if (strlen($signature_name) == 0 )
    {
    header("Location: signature_name_errorpage2.html");
    exit;
    }
    if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $email))
    {
    header("Location: email_errorpage2.html");
    exit;
    }
    if (strlen($email) == 0 )
    {
    header("Location: email_errorpage2.html");
    exit;
    }
    if (strlen($background) == 0 )
    {
    header("Location: background_errorpage2.html");
    exit;
    }
    //Sending Email to form owner
    $pfw_header = "From: $email\n"
    . "Reply-To: $email\n";
    $pfw_subject = "Signature Name Order";
    $pfw_email_to = "My address";
    $pfw_message = "Style : $style\n"
    . "size: $size\n"
    . "text_font: $text_font\n"
    . "signature_name: $signature_name\n"
    . "email: $email\n"
    . "comments: $comments\n"
    . "background: $background\n";
    *****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
    header("Location: confirmation2.html");
    }
    else
    {
    echo "You didn't submit this from my site";
    }
    ?>

    Thanks, Bird

  2. #2
    Andy128's Avatar
    Andy128 is offline Major General
    Join Date
    Dec 2005
    Location
    Michigan
    Posts
    2,322

    Default Re: Need Form Help, please

    Good morning Bird,

    It appears that on your form your field name is "Style" with a capital "S"
    and in your script it is $@style with a lower case. Therefore, it believes that there is a null entry and is giving the error page.

    Other problems:
    Form- "Size" Script- "size"
    Form-"commets" (missing n) Script-"comments"
    Form-"signature name" Script-"signature_name"

    Dont' forget to declare the variable "background" at the begining of your script too.

    Hope that helps.

    Andy
    PHP- is a blast!

  3. #3
    Andy128's Avatar
    Andy128 is offline Major General
    Join Date
    Dec 2005
    Location
    Michigan
    Posts
    2,322

    Default Re: Need Form Help, please

    Bird-
    I also found this on the HTTP_REFERRER global. Might might want to read before you make it a part of the script.

    Referrer data is great, but not all search-generated traffic to your site will have the correct referrer, or any referrer at all, for that matter. There are several reasons for this:
    Corporate firewalls. Some corporate firewalls strip out the referrer at the raw IP traffic level.

    Personal firewalls. Norton and other personal firewall software strip out the referrer to help preserve privacy.

    Broken browser software. Some browsers don't handle referrers correctly. This is true for some Macintosh versions of Internet Explorer.

    If one of these were to be true with your customer- then the script would not process. Probably a rare instance- but a possibility none the less.

    Just a thought.

    If you'd like to try a form that has security and displays all error messages with one page- give this a look;
    http: //www.netisopen.com/computer/TF001/phpmailto.html

    Andy
    PHP- is a blast!

  4. #4
    Bird's Avatar
    Bird is offline Captain
    Join Date
    Oct 2005
    Posts
    202

    Default Re: Need Form Help, please

    Quote Originally Posted by Andy128
    Good morning Bird,

    It appears that on your form your field name is "Style" with a capital "S"
    and in your script it is $@style with a lower case. Therefore, it believes that there is a null entry and is giving the error page.

    Other problems:
    Form- "Size" Script- "size"
    Form-"commets" (missing n) Script-"comments"
    Form-"signature name" Script-"signature_name"

    Dont' forget to declare the variable "background" at the begining of your script too.

    Hope that helps.

    Andy
    Thanks Andy, I really appreciate your help. I have made the adjustments, and it is now working. LOL
    I knew it had to be minor, just looked too hard, and couldn't see it.
    Thanks, and have a Great Day......
    Bird

  5. #5
    Bird's Avatar
    Bird is offline Captain
    Join Date
    Oct 2005
    Posts
    202

    Default Re: Need Form Help, please

    Quote Originally Posted by Andy128
    Bird-
    I also found this on the HTTP_REFERRER global. Might might want to read before you make it a part of the script.

    Referrer data is great, but not all search-generated traffic to your site will have the correct referrer, or any referrer at all, for that matter. There are several reasons for this:
    Corporate firewalls. Some corporate firewalls strip out the referrer at the raw IP traffic level.

    Personal firewalls. Norton and other personal firewall software strip out the referrer to help preserve privacy.

    Broken browser software. Some browsers don't handle referrers correctly. This is true for some Macintosh versions of Internet Explorer.

    If one of these were to be true with your customer- then the script would not process. Probably a rare instance- but a possibility none the less.

    Just a thought.

    If you'd like to try a form that has security and displays all error messages with one page- give this a look;
    http: //www.netisopen.com/computer/TF001/phpmailto.html

    Andy
    Andy, this is confusing. Not sure what to do here.
    So far some email is coming to me. But, I have no idea if other emails are not.

  6. #6
    Bird's Avatar
    Bird is offline Captain
    Join Date
    Oct 2005
    Posts
    202

    Default Re: Need Form Help, please

    Could I get some help from users here, and test my form.

    Also, just put test in the comments box.
    I do not have paypal on yet.

    http://www.fromtheheartofangels.com/...orderform.html

    Thanks, Bird

  7. #7
    Andy128's Avatar
    Andy128 is offline Major General
    Join Date
    Dec 2005
    Location
    Michigan
    Posts
    2,322

    Default Re: Need Form Help, please

    You're quite welcome my friend.

    Have a good day yourself.

    Andy
    PHP- is a blast!

  8. #8
    Bird's Avatar
    Bird is offline Captain
    Join Date
    Oct 2005
    Posts
    202

    Default Re: Need Form Help, please

    Quote Originally Posted by Andy128
    Bird-
    I also found this on the HTTP_REFERRER global. Might might want to read before you make it a part of the script.

    Referrer data is great, but not all search-generated traffic to your site will have the correct referrer, or any referrer at all, for that matter. There are several reasons for this:
    Corporate firewalls. Some corporate firewalls strip out the referrer at the raw IP traffic level.

    Personal firewalls. Norton and other personal firewall software strip out the referrer to help preserve privacy.

    Broken browser software. Some browsers don't handle referrers correctly. This is true for some Macintosh versions of Internet Explorer.

    If one of these were to be true with your customer- then the script would not process. Probably a rare instance- but a possibility none the less.

    Just a thought.

    If you'd like to try a form that has security and displays all error messages with one page- give this a look;
    http: //www.netisopen.com/computer/TF001/phpmailto.html

    Andy
    Once again, I am back...
    I am receiving orders, but not getting payments with paypal.
    I have inserted the html link from paypal. Would there happen to ba a reason why? The way my form is set up?
    (Both Animated Sparkle Names & Signature Name Orders)

  9. #9
    Andy128's Avatar
    Andy128 is offline Major General
    Join Date
    Dec 2005
    Location
    Michigan
    Posts
    2,322

    Default Re: Need Form Help, please

    Bird-
    It appears to be working? I entered test in a form hit submit- this took me to a page to click on the paypal button. I did so and It brought up pay-pal and the amount owed. I stopped there.

    I would say- based on that, that it is a pay-pal problem.

    Andy
    PHP- is a blast!

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49