Hi!
I have some forms that is sendt to me by php mail() a few days ago these where working just fine, but suddenly yesturday i stoped recieving the emails. There ate two different types of these forms one that is connected to a mySQL server, and one that is not.
Here is the code of the one that is not sent to the mySQL server:
<?php
//if($_GET["id"] == "web"){
if(isset($_GET["id"]) && $_GET["id"] == "web"){
echo "";
} else { ?>
<div class='skjul_i_normal'>
<form action="" method="POST">
<input type='text' name='lanebelop' value='Hvor mye vil du låne?' onclick="javascript:value=''" ><br >
<input type='text' name='personnummer' value='Skriv inn personnummer' onclick="javascript:value=''" ><br >
<input type='text' name='epost' value='Skriv inn e-post adresse' onclick="javascript:value=''" ><br >
<input type='text' name='telefon' value='Skriv inn mobilnummer' onclick="javascript:value=''" ><br >
<span class='lille_check'>
<input type='checkbox' name='check' value='check' class='radio' >
Ved å sende inn lånesøknaden aksepterer du/dere at det blir foretatt en kredittvurdering av deg/dere.
Det aksepteres også at gjenpartsbrev fra kredittvurderingsselskap kan bli sendt elektronisk pr sms.
Videre aksepteres det at all kommunikasjon med kredittgiver kan foregå elektronisk
</span>
<input type='submit' name='submit' value="Send inn søknad" class='knap' >
</form>
<?php
if(isset($_POST["submit"])){
if($_POST["lanebelop"] == "Hvor mye vil du låne?" || $_POST["personnummer"] == "Skriv inn personnummer" || $_POST["epost"] == "Skriv inn e-post adresse" || $_POST["check"] == ""){
echo "<br >
<span class='red'>Alle felter må fylles ut</span>";
} else {
echo "<br ><br ><br ><span class='red'>Takk for din søknad. Vi kontakter deg!</span>";
$to = "post@bbf.no";
$subject = "BB Finans - Iphonesøknad";
$message = "Lånebeløp: ".$_POST['lanebelop']."<br >";
$message .= "Personnummer: ".$_POST['personnummer']."<br >";
$message .= "Epost: ".$_POST['epost']."<br >";
$message .= "Mobiltlf: ".$_POST['telefon']."<br >";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "Fra:".$_POST["epost"];
$headers .= "\nReply-To:". $_POST["epost"];
$sentOk = mail($to,$subject,$message,$headers);
}
}
?>
</div>
<?php } ?>
Can someone tell me if there is something wrong with this code? It seems weird that it should be the code since it was working fine a few days ago, but i talked to my web host and they said nothig was wrong with the server.
Thanks in advance!