Need Help With My php Script... I Think?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Skipper Si
    Private First Class

    • Jun 2007
    • 5

    Need Help With My php Script... I Think?

    Hi There,

    I'm sure this is something very stupid like I've missed a full stop somewhere but I've been through it about 8 times and my head hurts now...

    After the submit button is clicked my 3rd page comes up fine but instead of all the details coming through all I get is an email like this:

    (unknown sender)

    First_Name:
    Last_Name:
    Email:
    Telephone:

    Here's the php code I'm using if anyone can spot what I've done wrong please point it out it's doing my head in!

    <?php
    @$First_Name = addslashes($_POST['First_Name']);
    @$Last_Name = addslashes($_POST['Last_Name']);
    @$Email = addslashes($_POST['Email']);
    @$Telephone = addslashes($_POST['Telephone']);
    $pfw_header = "From: $Email\n"
    . "Reply-To: $Email\n";
    $pfw_subject = "Lottery Report";
    $pfw_email_to = "simon.p.fisher@googlemail.com";
    $pfw_message = "First_Name: $First_Name\n"
    . "Last_Name: $Last_Name\n"
    . "Email: $Email\n"
    . "Telephone: $Telephone\n"
    ;
    *****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
    header("Location: page3.html");
    ?>

    And here's the first link again www.report4free.co.uk

    Like I say all 3 pages come up fine I'm just not getting any details.

    Cheers,

    Si
  • Watdaflip
    Major General

    • Sep 2005
    • 2116

    #2
    Re: Need Help With My php Script... I Think?

    Try changing
    $pfw_message = "First_Name: $First_Name\n"
    . "Last_Name: $Last_Name\n"
    . "Email: $Email\n"
    . "Telephone: $Telephone\n"
    ;
    To
    $pfw_message = "First_Name: ".$First_Name."\n"
    . "Last_Name: ".$Last_Name."\n"
    . "Email: ".$Email."\n"
    . "Telephone: ".$Telephone."\n"
    ;

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

    Comment

    • Skipper Si
      Private First Class

      • Jun 2007
      • 5

      #3
      Re: Need Help With My php Script... I Think?

      No joy I'm afraid :o(

      I've just watched the vodahost tutorial on setting up forms and it's different to the tutorial I followed originally...

      My instructions said to save the php script as an all files and copy it into the BlueFTP folder...

      But vodahostess says to do it another way... I'll do it again, her way and get back to you...

      Thanks for your help,

      Si

      Comment

      • Watdaflip
        Major General

        • Sep 2005
        • 2116

        #4
        Re: Need Help With My php Script... I Think?

        Probably the first thing I should have asked, but are you sure that your form is correct. Do the "name" attributes match up (they are case sensitive)

        Register/Login Script
        Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

        Comment

        • navaldesign
          General & Forum Moderator

          • Oct 2005
          • 12080

          #5
          Re: Need Help With My php Script... I Think?

          Your problem (i have already answered you in http://www.vodahost.com/vodatalk/sav...tml#post166452 ,) is that you need to set the encoding type of your form in "multipart/formdata"
          Navaldesign
          Logger Lite: Low Cost, Customizable, multifeatured Login script
          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

          Comment

          • Skipper Si
            Private First Class

            • Jun 2007
            • 5

            #6
            Re: Need Help With My php Script... I Think?

            Ooo! You beat me to it!

            I've just watched the form tutorial again and noticed that I forgot to change the encoding type...

            It's all working fine now :o)

            Thank you for all your help everybody, I really appreciate it.

            I'm going to try a whole website next (not just a few pages) so I will no doubt be needing your help again soon.

            Thanks again,

            Si

            Comment

            • Skipper Si
              Private First Class

              • Jun 2007
              • 5

              #7
              Re: Need Help With My php Script... I Think?

              Originally posted by navaldesign View Post
              Sorry, I'm still a bit new to this forum game. Should have checked my other threads first :o)

              Si

              Comment

              Working...
              X