Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Contact Form

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #25317
    benn
    Participant

    hey there peeps.

    Im trying to implement a contact form that uses php and then redirects to an error or success page.

    What im getting stuck with is getting it to work inside wordpress.

    Im trying to use the contact form chris setup a while back, well using the php code for it anyways.

    Can anyone shed some light for me please.

    Thanks

    Here is the code im using:

    The page template:

    Code:

    Contact Blindeye Films:






    The contact form php code:

    Code:
    “;
    exit;
    }

    // prepare email body text
    $Body = “”;
    $Body .= “Name: “;
    $Body .= $Name;
    $Body .= “n”;
    $Body .= “Tel: “;
    $Body .= $Tel;
    $Body .= “n”;
    $Body .= “Email: “;
    $Body .= $Email;
    $Body .= “n”;
    $Body .= “Message: “;
    $Body .= $Message;
    $Body .= “n”;

    // send email
    $success = mail($EmailTo, $Subject, $Body, “From: <$EmailFrom>“);

    // redirect to success page
    if ($success){
    print ““;
    }
    else{
    print ““;
    }
    ?>

    And the redirect page:

    Code:

    Your message has been sent!

    Go Home

    #60012
    TeMc
    Member

    I don’t see anything wrong with a quick overview, althouguh using a meta redirect sounds weird….

    Looking at what your goal is, you may wanna give "WP Contact Form" a shot. It certainly did the job for me.
    In the adminpanel you can set up a thank you, and fail message.

    Also, its’ very secure (does all kinds of trimms and stript for possible injections). And it comes with a language file that one can use. Light weight, secure and customizable.

    I say try it, it’s free
    Check here

    #60014
    mattvot
    Member

    the problem may be the location of the action file contactengine.php

    Try using a full URL to define its location

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.