i have this code and i am trying to write code to send email or of the side or send to link of this side how can i write that code with database
<form action="mail.php" method="post">
<label for="email">your friend email</label>
<input name="email" type="edit"/>
<input type="submit" value="send link to friend"/>
</form>
<?
if (isset($_POST('email')) {
if (!mail($_POST('email'), "Site link", "check this link " .
$_SERVER['HTTP_REFERER'])) {
echo "I couldn't send email, sorry.";
}
}
?>