No data was sended to mysql. Tryed without error message, im crashed end point.
No data goint to mysql server
I tryed figure out how it wont send but no luck at all. Not a code master sorry. Please help fix this error!
elseif ($inav == "feedbackreport")
{
echo '<div class="alert alert-success" role="alert">';
echo '<h4 class="alert-heading">Feedback report</h4>';
echo '<p>Have some feedback about my site or want contact?</p>';
echo ' <hr>';
echo '<p class="mb-0">Just fill required fields</p>';
echo ' </div>';
{
echo '<form action="?inav=feedbackverify" method="post">';
echo '<p><strong><div style="padding:5px 10px;"><span style="font-size:14px; color:#428FF3;">Describe your feedback</strong><p><p>
<textarea id="feedback" name="feedback" class="form-control" placeholder="Whats the feedback?" rows="3"></textarea>
</div>';
echo '<strong><div style="padding:5px 10px;"><span style="font-size:14px; color:#428FF3;">Your e-mail</span></span></strong><p><p>
<input type="email" name="mail" placeholder="Email" class="form-control">
</div>';
$integer1 = rand(0,10);
$integer2 = rand(0,10);
$sum = $integer1 + $integer2;
echo '<input type="hidden" value="'.$sum.'" name="sum">';
echo '<div class="alert alert-primary" role="alert">
SPAM-protection How much is <span style="color: #808080;"><strong>'.$integer1.' + '.$integer2.'</strong></span> ?
</div>';
echo '<div style="padding:5px 10px;"><span style="font-size:14px; color:#428FF3;">
<input type="number" name="spam" placeholder="Number Answer Only" class="form-control">
</div>';
echo '<div style="padding:5px 10px;"><span style="font-size:14px; color:#428FF3;">
<button type="submit" class="btn btn-secondary btn-sm">Send</button>
</div>';
}
}
elseif ($inav == "feedbackverify")
{
$feedback = mysqli_real_escape_string($conn, $_POST['feedback']);
$mail = mysqli_real_escape_string($conn, $_POST['mail']);
$sum = mysqli_real_escape_string($conn, $_POST['sum']);
$spam = mysqli_real_escape_string($conn, $_POST['spam']);
$mailCheck = mailCheck($mail);
if($mailCheck==TRUE && $sum==$spam)
{
mysqli_query($conn, $query);
$query = "INSERT INTO feedbacks (feedback,mail) VALUES ('".$feedback."','".$mail."')";
echo '<p style="text-align: center;"><span style="color:#008000;"><span style="font-size:18px;"><strong>Thank you for reporting, i will take a look ASAP!</strong></span></span></p> <p style="text-align: center;"><img src="img/smile_big.png" title="Smile more and enjoymy site!" /></p>';
}
else
{
echo '<p><div class="alert alert-danger" role="alert"><span style="color:#FF0000"><strong>Error: Wrong mail format OR wrong spam-protection! Go back and try it again.</strong></span></div>';
echo '<div style="padding:5px 10px;"><INPUT TYPE="button" class="btn btn-secondary btn-sm" VALUE="Go Back" onClick="history.go(-1);"></div>';
}
}