Hi
My PHP knowledge is very very small. This code was written for me by a friend but everytime I ask him for help I end up being more confused then I was anyways . It was working perfectly until I changed my webspace to another provider.
<?php
if ($email == "") {
require_once ("xyz1.html");
} else {
$pos = strrpos($email, "@");
if ($pos != false) {
$to = "email@address.com";
$headers = "From: \"".$name."\"<".$email.">\n";
$message = " \n Name: $name , ...";
$sent = mail ($to, mailheadersubject, $message, $headers);
require_once ("send.html");
} else {
require_once ("xyz2.html");
}
}
?>
... and the HTML part:
<form action="send.php" method="GET">
Apart from that it's just a normal HTML contact form. As I said nothing has changed exepct the provider, so my only guess would be that the problem is that part of this code doesn't work as it used to on a newer version of PHP.
What it did was - as you probably see in the code anyway - checking if there was something written in the contact form where you put in your email, else show xyz1.html , then checking if there is a "@" in the email address and if there is send the email, if not posting the xyz2.html.
Now it always shows the xyz1.html, no matter what is written in the email part of the contact form.
I hope there is a small simple solution to the problem, but I'm grateful for any help I can get
greetings