I have a form where you can send an email to someone, if i reload the page it sends anouther email. How do I make it so it does not do that? A forum said to change it to GET, that did not work either. mail function is not showing up.
<form action="index.php" method="GET">
<textarea name="comment" cols="16.5" rows="5" style="resize: none;" maxlength="240"> </textarea>
<input type="submit" value="Send Comment" />
<?php
if (isset($_GET['comment'])) {
$com = mysql_real_escape_string($_GET['comment']);
if (!empty($com)) {
if (strlen($com) <= 240 && strlen($com) >= 5) { $mail = mail('__________', 'Comments', $com);
}
}
}
?>
</form>