I'm having some problems with a php mail function I'm trying to implement..
Originally my code was inserting the variables into a database on submit but now I'm trying to swap the code so it gets emailed instead..
The code is as follows.. It doesn't seem to want to work though, any suggestions will be a great help!
Thanks
This is the email function
$email = "[email protected]"
mail($email, $msg, "From: xxxxx \nX-Mailer:PHP/" . phpversion());
header("Location: index.php?act=topic&id=".$advert_id);
and this is the form its just submitted from
echo "<form method=\"post\" action=\"./index.php?act=reply&id=".$row['id']."\">";
echo "<tr><td><textarea style=\"width:90%\" name=\"reply\"></textarea><br><input type=\"submit\" name=\"submit\" value=\"Send Message\" style=\"width:90%\"></td></tr>";
echo "</table>";