Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2005
    Location
    Portugal
    Posts
    12

    Red face Unanswered: help me out please...

    i need a litle help here if possible
    how do i manage to make this work without connecting to the DB of sql
    i want this form below to send to the admin email everythime someone clicks the submit button

    contact.php

    <?php

    include "header.php";
    include "config.php";
    include "connect.php";
    ?>
    <table width="85%" border="0" cellspacing="5" cellpadding="5" align="center">
    <tr>
    <td>
    <center>
    <font size="2"> <br>
    Feel free to contact us after you have completely read the <a href="../help.php">FAQ</a>
    section of the site.<b><br>
    YOU WILL NOT RECEIVE A REPLY IF YOUR QUESTION <br>
    HAS ALREADY BEEN ANSWERED IN THE HELP SECTION OF THE SITE!</b></font>
    </center>
    <font size="2"><br>
    </font>
    <hr align="center">
    <font size="2">
    </font>

    <center>
    <form method="POST" action="contactnow.php"><br>
    Name:<br><input type="text" name="name" value=""><br>
    Email:<br><input type="text" name="name" value=""><p><p>
    Subject:<br><input type="text" name="Subject" value=""><br>
    Message:<br><textarea name="Message" rows="15" cols="40"></textarea><br>
    <input type="submit" value="Send">
    </form>
    </center>
    </td>
    </tr>
    </table><p>

    <font size="2"><br>
    </font>
    <hr align="center">
    <font size="2"><br>
    </font>

    <?
    include "banner.php";
    ?>
    <?
    include "footer.php";
    ?>

    file contactnow.php

    <?php

    session_start();

    include "header.php";
    include "config.php";
    include "connect.php";
    include "banner.php";

    $Name = $_FROM['Name'];
    $Email = $_REPLY['Email'];
    $Subject = "[SUPPORT] ".$_POST['Subject'];
    $Message = $_POST['Message'];

    $Message .= "\n\n---------------------------------------\nSubmitted by:\n";
    $Message .= $Name;
    $Message .= "\n";
    $Message .= $Email;
    $headers .= "From: $Email<$contactemail>\n";
    $headers .= "Reply-To: <$contactemail>\n";
    $headers .= "X-Sender: <$AdminEmail>\n";
    $headers .= "X-Mailer: PHP4\n";
    $headers .= "X-Priority: 3\n";
    $headers .= "Return-Path: <$AdminEmail>\n";

    @mail($AdminEmail, $Subject, wordwrap(stripslashes($Message)),$headers);
    }
    ?>
    <center>Thank you, your support request has been sent.</center>
    </td></tr></table>
    <?
    include "footer.php";
    ?>

    end.

    thanks in advance
    Jose Furtado

  2. #2
    Join Date
    Apr 2005
    Location
    Baltimore, MD
    Posts
    297

  3. #3
    Join Date
    Oct 2005
    Location
    Portugal
    Posts
    12
    ... i already know that page and there was where i coded almost it all..

    i really need a hand here!

  4. #4
    Join Date
    Aug 2004
    Location
    San Antonio, TX
    Posts
    84
    Either replace $AdminEmail with the actual email address or assign the email address to $AdminEmail.

Posting Permissions

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