Announcement

Collapse
No announcement yet.

Need Form Help, please

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

    http://www.fromtheheartofangels.com/

  • #2
    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!

    Comment


    • #3
      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!

      Comment


      • #4
        Re: Need Form Help, please

        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

        http://www.fromtheheartofangels.com/

        Comment


        • #5
          Re: Need Form Help, please

          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.

          http://www.fromtheheartofangels.com/

          Comment


          • #6
            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

            http://www.fromtheheartofangels.com/

            Comment


            • #7
              Re: Need Form Help, please

              You're quite welcome my friend.

              Have a good day yourself.

              Andy
              PHP- is a blast!

              Comment


              • #8
                Re: Need Form Help, please

                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)

                http://www.fromtheheartofangels.com/

                Comment


                • #9
                  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!

                  Comment

                  Working...
                  X