The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 3 of 3

Thread: Contact Form

  1. #1

    Afrostyle Contact Form

    Hi i am making a website and i'd like a contact form on there
    i have all off the forms layed out on my page and i took
    this from a tutorial i found and edited it, im no programmer,
    but could somebody please take a look at this for me please.

    also id like to add a upload and browse button to my site
    if anybody can help with that too id appreciate it alot.

    thanks, heres the code;


    $headers = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    echo"no email address found";
    $senderName = $_POST['senderName'];
    $senderSurName = $_POST['senderSurName'];
    $senderEmail = $_POST['senderEmail'];
    $senderMsg = nl2br($_POST['senderMsg']);
    $senderSex = $_POST['senderSex'];
    $senderPhne = $_POST['SenderPhne'];
    $senderRpl = $_POST['senderRpl'];
    $sitename = "BC Fit Future";
    $to = "";
    $ToName = "Ben Chibnall";
    $date = date("m/d/Y H:i:s");
    $ToSubject = "Email From $senderName via $sitename";
    $comments = $msgPost;
    $EmailBody = "A visitor to $sitename has left the following information<br />
    Sent By: $senderName
    <br /><br />
    Message Sent:
    <br />$senderMsg<br /><br />
    Sex: $senderSex<br /><br />
    Require reply: $senderRpl
    <br />
    <br />
    <br />$senderPhone<br />;
    $senderPhne = $_POST['senderPhne'];"
    $EmailFooter = "<br />Sent: $date<br /><br />";
    $Message = $EmailBody.$EmailFooter;
    $ok = mail($to, $ToSubject, $Message, $headers . "From:$senderName <".$to.">");
    echo "retval=1";
    echo "retval=0";


  2. #2
    Not clear what exactly is the error that you are getting. Are you not getting the email on form submission?

    I would suggest updating this way:
    PHP Code:
    $headers .= "$to\r\n";

    $ok mail($to$ToSubject$Message$headers); 
    The following links might be help:
    Email form with file attachment in PHP

    PHP email contact form

  3. #3
    hi im not getting a error but its not actually sending the e-mail,
    i will check out the links u gave me thanks for your help,
    so do you think this php looks ok?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012