Help With Contact Me Script

5 replies
Hello Could anyone please go towww. fringebanker.con and look at my website. I have been working on it and need help making my "contact me" script work. I do not know how to use it. Does it link with my e-mail? Where would you check that at? Or is it best just to scrap the "contact me form "and just put in a e-mail hyper-link which I do not know how to do either. Thanks
#contact #script
  • Profile picture of the author joaquin112
    You should edit the configuration file that came with your script. That's where you put your e-mail address...
    Signature

    Publish your digital course at Accomplisher.com. We create the video sales letter, drive affiliate traffic and split the profits with you. If you want to start making money by teaching online, submit your application here.

    {{ DiscussionBoard.errors[7915914].message }}
  • Profile picture of the author NatesMarketing
    I don't know you're code, but here's one that's pretty self explanatory:

    For some reason the PHP tags aren't working...but here ya go:

    <?php

    /**
    * Change the email address to your own.
    *
    * $empty_fields_message and $thankyou_message can be changed
    * if you wish.
    */

    // Change to your own email address
    $your_email = "YOUR@EMAIL.COM";

    // This is what is displayed in the email subject line
    // Change it if you want
    $subject = "YOUR SUBJECT";

    // This is displayed if all the fields are not filled in
    $empty_fields_message = "<p>Please go back and complete all the fields in the form.</p>";

    // This is displayed when the email has been sent
    $thankyou_message = "<p>Thank you. Your message has been sent to YOUR NAME.</p>";

    // You do not need to edit below this line

    $name = stripslashes($_POST['txtName']);
    $email = stripslashes($_POST['txtEmail']);
    $message = stripslashes($_POST['txtMessage']);

    if (!isset($_POST['txtName'])) {

    ?>
    <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
    <table width="500" border="0" align="center" cellpadding="0" cellspacing="2">
    <tr>
    <td width="35%"><div align="right">Your Name: </div></td>
    <td width="65%"><input name="txtName" type="text" class="email-box" style="color:#000000" title="Enter your name" /></td>
    </tr>
    <tr>
    <td><div align="right">Your Email: </div></td>
    <td><input name="txtEmail" type="text" class="email-box" style="color:#000000" title="Enter your email address" /></td>
    </tr>
    <tr>
    <td valign="top"><div align="right">Your Message: </div></td>
    <td><textarea name="txtMessage" cols="35" rows="5" class="email-box" title="Enter your message"></textarea></td>
    </tr>
    </table>
    <p align="center"><label for="txtEmail"></label>
    <label title="Send your message">
    <input type="submit" class="email-box" value="Send Email" />
    </label>
    <br />
    </p>
    </form>

    <?php

    }

    elseif (empty($name) || empty($email) || empty($message)) {

    echo $empty_fields_message;

    }

    else {

    // Stop the form being used from an external URL
    // Get the referring URL
    $referer = $_SERVER['HTTP_REFERER'];
    // Get the URL of this page
    $this_url = "http://".$_SERVER['HTTP_HOST'].$_SERVER["REQUEST_URI"];
    // If the referring URL and the URL of this page don't match then
    // display a message and don't send the email.
    if ($referer != $this_url) {
    echo "You do not have permission to use this script from another URL, nice hacking attempt moron.";
    exit;
    }

    // The URLs matched so send the email
    mail($your_email, $subject, $message, "From: $name <$email>");

    // Display the thankyou message
    echo $thankyou_message;

    }

    ?>
    {{ DiscussionBoard.errors[7915925].message }}
  • Profile picture of the author NatesMarketing
    Actually, you're using WordPress...why not use WordPress › Contact Form 7 « WordPress Plugins ?
    {{ DiscussionBoard.errors[7915952].message }}

Trending Topics