<?php

// Make a MySQL Connection

mysql_connect("localhost", "dev123_zncr1", "piJpSignNIIjGf2C") or die(mysql_error()); // change to your database server, user name, password

mysql_select_db("dev123_zncr1") or die(mysql_error()); // change "user" to ur database name



mysql_query("INSERT INTO zencart_product_registration VALUES('','$_POST[salution]','$_POST[fname]','$_POST[lname]','$_POST[address1]','$_POST[address2]','$_POST[city]','$_POST[state]','$_POST[zip]','$_POST[pphone]','$_POST[sphone]','$_POST[email]','$_POST[pname]','$_POST[size]','$_POST[dop]','$_POST[rprice]','$_POST[reason]','$_POST[sname]','$_POST[slocation]','$_POST[manufact]','$_POST[model]','$_POST[invoice]','$_POST[mprice]','$_POST[comment]', CURDATE()) ") 

or die(mysql_error());  



$to = "m_rashkovsky@hotmail.com";

$subject = "From Site";



$message = "

<html>

<head>

<title>EMAIL</title>

</head>

<body>

<p>Slaution:'$_POST[salution]'</p>

<p>Name : '$_POST[fname]' '$_POST[lname]'

<p>Address : '$_POST[address1]' <p> Addrees2 : '$_POST[address2]' <p> City :'$_POST[city]' <p>State :'$_POST[state]'<p>Zip:'$_POST[zip]'

<p>Phone 1 : '$_POST[pphone]' <p>Phone 2:'$_POST[sphone]'<p>Email : '$_POST[email]'<p>Product name : '$_POST[pname]'<p>Size: '$_POST[size]'<p>Purchase date: '$_POST[dop]'<p>Price : '$_POST[rprice]'<p>Reason : '$_POST[reason]'<p>Store : '$_POST[sname]'<p>Location : '$_POST[slocation]'<p>Manufacutrer : '$_POST[manufact]'<p>Model :'$_POST[model]'<p>Invocie : '$_POST[invoice]'<p>Matress Price : '$_POST[mprice]'<p>Comment : '$_POST[comment]'

</body>

</html>

";



// Always set content-type when sending HTML email

$headers = "MIME-Version: 1.0" . "\r\n";

$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";



// More headers

$headers .= 'From: <mario@supplynyc.com>' . "\r\n";

$headers .= 'Product registration form';



mail($to,$subject,$message,$headers);
echo "Thank You For Contacting Us";
?>

