sinds a couple of days my form has stopped working. I'm not really familiar with PHP and i have no idea how to get it working again.
I'm hosting my site on one.com , it has been working fine for about a year now, and suddenly it stopped working? I've been searching the internet and i'm finding all kinds of answers 'you have to update your php code...' but i'm not familiar with PHP so please help :D
The form.php :
<?php
/* Set e-mail recipient */
$myemail = "info@kongweb.be";
/* Check all form inputs using check_input function */
$naam = check_input($_POST['naam']);
$mail = check_input($_POST['mail']);
$bericht = check_input($_POST['bericht']);
/* Let's prepare the message for the e-mail */
$message = "Hallo!
Wij ontvingen een contactformulier met de volgende gegevens:
Naam: $naam
E-mailadres: $mail
Message: $bericht
Einde van dit bericht.
";
/* Send the message using mail() function */
$headers = "From: info@kongweb.be";
mail($myemail, $subject, $message);
/* Redirect visitor to the thank you page */
header('Location:bedankt.html');
exit();
/* Functions we used */
function check_input($data, $problem='')
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
if ($problem && strlen($data) == 0)
{
show_error($problem);
}
return $data;
}
function show_error($myError)
{
?>
<html>
<body>
<b>Please correct the following error:</b><br />
<?php echo $myError; ?>
</body>
</html>
<?php
exit();
}
?>
And the code for the contact form on the index.html :
<!-- contact begin -->
<div id="contact" class="container-fluid text-center tekst2">
<h1>Contact</h1>
<form name="contact" method="post" action="https://kongweb.be/form.php" onsubmit="return validateForm()" >
<input type="hidden" name="subject" value="contact">
<div class="row slideanim spatieform">
<div class="col-sm-12">
<input type="text" name="naam" size="30" id="naam" required placeholder="Name">
</div>
</div>
<div class="row slideanim spatieform">
<div class="col-sm-12">
<input type="text" name="mail" size="30" id="mail" required placeholder="Email">
</div>
</div>
<div class="row slideanim spatieform">
<div class="col-sm-12">
<textarea name="bericht" id="bericht" cols="30" rows="8" required placeholder="Message"></textarea>
</div>
</div>
<div class="row slideanim spatieform">
<div class="col-sm-12">
<input type="submit" name="submit" value="Send it" style="background-color: #F3E600">
</div>
</div>
</form>
</div>
<!-- contact einde -->