Results 1 to 7 of 7

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

  1. #1
    Skipper Si is offline Private First Class
    Join Date
    Jun 2007
    Posts
    5

    Question 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

  2. #2
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default 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

  3. #3
    Skipper Si is offline Private First Class
    Join Date
    Jun 2007
    Posts
    5

    Default 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

  4. #4
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default 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

  5. #5
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  6. #6
    Skipper Si is offline Private First Class
    Join Date
    Jun 2007
    Posts
    5

    Default 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

  7. #7
    Skipper Si is offline Private First Class
    Join Date
    Jun 2007
    Posts
    5

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

    Quote 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

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