hi all;
can anyone tell me where can i find a good example for this;
i have this whole code
<?php
$name = $_POST['name'];
$sender = $_POST['e_mail'];
$phone = $_POST['phone'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$email = $_POST['email'];
// Insert data into hotelinfo table
$sql="INSERT INTO mailRecord(name, sender, phone, subject, fax, message)
VALUES('$name', '$sender', '$phone', '$subject', '$message')";
$result=mysql_query($sql);
mysql_close();
$to = ''.$email.'' . ', '; // note the comma
$to .= 'frankcris@activediscovery.net';
$subject = "$subject";
$body = "Guest message.\n\n $message\n\n";
mail ($to , $subject, $body, 'From: '.$sender.'');
?>
<script type="text/javascript">
alert("Thank you for sending a message!")
window.history.back(1);
</script>
I cant inseert the data into database. pleas hlp me
thank for advance