Jump to content

getintouch.php


xposure

Recommended Posts

I have set up a email form and the getintouch.php sript is in the same directory.

 

I have just changed web hosts and now the form does not work.

 

The form used to work with my previous host.

 

the form is at: http://www.xposureinteractive.co.uk/contactus.html

 

Can you help?

 

The script I am using is below:

<?

 

/****************************************/

 

/*        phpMyFormmail 1.1            */

 

/*        © 2003 Manuel M-M          */

 

/*  Released under GNU-Public-Licence  */

 

/****************************************/

 

 

 

# Before you start configuring the system it`s recommend to read "install.txt"

 

# Your suggestions, and so, are welcome.

 

# So send me these. Problems, errors, ... are also welcome.

 

# If you`ve problems with the script, send me a mail.

 

 

 

/*  CONFIGURATION START                */

 

/****************************************/

 

 

 

/* Enter your Domain... you can also enter $SERVER_NAME if that`s working too!? */

 

$allowed_domain = "xposureinteractive.co.uk";

 

 

 

/* Here you can define the starting text of the email */

 

$start = "The form with the subject $subject has been submitted from xposureinteractive.co.uk\n\n";  /* This is the start text of your email */

 

 

 

/* Now enter the way you post the form... (You can enter POST or GET) - POST HAS GOT MORE SECURITY!!! */

 

$vartype = "POST";

 

 

 

/* Show the user`s all errors (no php) - "true" :YES, "false" :NO */

 

$show_errors = true;

 

 

 

 

 

/*  CONFIGURATION END                  */

 

/****************************************/

 

/* Do not edit the following codes...  */

 

 

 

 

 

$recipient_mail = explode("@",$recipient);

 

$recipient_domain = $recipient_mail[1];

 

 

 

if ((!$recipient == "") && (!$redirect == "") && (!$subject == "") && (!$recipient_domain == "$allowed_domain"))

 

{

 

$error = "In the formular where you entered your

 

data is an error, because the webmaster forgot to<br>

 

create the hidden fields <i>recipient,redirect or subject.</i>";

 

} else {

 

 

 

$line = "0";

 

$vartype = strtolower($vartype);

 

if ($vartype == "get") {

 

foreach ($HTTP_GET_VARS as $name => $value) {

 

if (!$line) {

 

$line = "$name - $value\n";

 

        $line++;

 

} else {

 

$inhal .= "$name - $value\n";

 

        $line++;

 

}

 

}

 

} else {

 

foreach ($HTTP_POST_VARS as $name => $value) {

 

if (!$line) {

 

$line = "$name - $value\n";

 

        $line++;

 

} else {

 

$inhal .= "$name - $value\n";

 

        $line++;

 

}

 

}

 

}

 

 

 

if ($headers == "") { $headers = ""; }

 

         

 

$headers .= "From: <contact_us@$allowed_domain>\r\n";

 

$headers .= "X-Mailer: phpMyFormmail 1.1";

 

 

 

$recipientt = $recipient;

 

 

 

$msg = $start;

 

$msg .= $inhal;

 

 

 

 

 

if ((mail($recipientt, $subject, $msg, $headers)) && ($error == "")) {

 

header("location: $redirect");

 

} else {

 

if ($error == "") {

 

$error = "There was an error while trying to send email";

 

}

 

}

 

}

 

if ($show_errors) { echo $error; die(); }

 

?>

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/97843-getintouchphp/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.