Anyone here know PHP?

Discussion in 'The Fire Hydrant' started by Sweet72947, Jan 9, 2012.

  1. Sweet72947

    Sweet72947 Squishy face

    Joined:
    May 18, 2006
    Messages:
    9,158
    Likes Received:
    1
    Trophy Points:
    36
    Gender:
    Female
    Occupation:
    1 Dog, Norris!
    Location:
    Northern Virginia
    Home Page:
    I am trying to get a form to work on a website I made, and I can't get it to function properly.

    Here's the form:
    http://www.wscc.site11.com/memapp.html

    Here is the code:

    <?php
    {
    $myemail="cfaurot@mail.com";
    $subject = "Warrenton Stamp & Coin Club Membership";

    $Fname = $_POST['Fname'];
    $Lname = $_POST['Lname'];
    $Saddress = $_POST['saddress'];
    $city = $_POST['city'];
    $state = $_POST['state'];
    $zip = $_POST['zip'];
    $phone = $_POST['phone']
    $email = $_POST['email'];


    $message="This membership form has been submitted by:

    Name: $Fname
    Address: $Sadress
    City: $city
    State: $state
    Zip: $Zip";

    mail ($myemail, $subject, $message);

    header('Location: contactmem2.html');
    exit();

    }
    ?>
     
  2. J. Morrison

    J. Morrison New Member

    Joined:
    Dec 5, 2011
    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    0
    Home Page:
    Are the form titles correct in the HTML?
     
  3. Beanie

    Beanie Clicker Cult Coordinator

    Joined:
    May 17, 2006
    Messages:
    14,011
    Likes Received:
    0
    Trophy Points:
    36
    Gender:
    Female
    Location:
    Illinois
    Home Page:
    You're missing some case sensitivity here:
    $Saddress = $_POST['saddress'];
    and here:
    Zip: $Zip";

    Also, Address: $Sadress - you're missing the second d.

    Missing the ";" here: $phone = $_POST['phone']


    Try that... see what (if any) error message it gives you then...
     
  4. Sweet72947

    Sweet72947 Squishy face

    Joined:
    May 18, 2006
    Messages:
    9,158
    Likes Received:
    1
    Trophy Points:
    36
    Gender:
    Female
    Occupation:
    1 Dog, Norris!
    Location:
    Northern Virginia
    Home Page:
    Ok, it semi-works now. Thanks Beany!

    I just need to tweak a few things and then it should work completely. :)
     

Share This Page