I made this form on my website http://crstylestudio.com/contactus.php Now only thing I don't know how to do is code the part when someone fills form out and clicks submit that it sends me a email. Could anyone help. I will pay you right away. Need this done by tonight
Which one you prefer? attaching the php here and me getting it done or would i do it myself directly and send to you?
something like this? if (!$_POST['submit']) { ?> <script language="Javascript"> function CheckForm() { from = document.getElementById('from'); message = document.getElementById('message'); if (!from.value || !message,value) { alert("Email ID or message is missing !"); return false; } else return true; } </script> <center><h1>Mail Your Queries</h1></center><h3>Submit your queries using the form below</h3> <form action="contactus.php" method="post" onsubmit="return CheckForm();"><br/> <input size="40" type="text" name="from" value="Enter Your Email ID" size="120" onfocus="if(this.value=='Enter Your Email ID'){this.value=''}" ><br /><br /> <input size="40" type="text" name="subject" value="Enter Your Subject" size="120" onfocus="if(this.value=='Enter Your Subject'){this.value=''}" ><br /><br /> <textarea name="message" rows="5" cols="5" onfocus="if(this.value=='Enter Your Query Here'){this.value=''}">Enter Your Query Here</textarea><br/> <input name="submit" type="submit" value="Send Query" > <br /><br /> </form> <? } else { ?> <center><h1>Mail Your Queries</h1></center> <h3>Your queries have been send. Thanks for your concern. You will contacted soon </h3> <? $to = 'email@email.com'; $from = addslashes($_POST['from']); $subject = addslashes($_POST['subject']); $message = addslashes($_POST['message']); $headers = 'From: '.$from . "\r\n" . 'Reply-To: email@email.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); } PHP: You need to customized it to your own needs. I use it on my site
no way to put it http://crstylestudio.com/contactus.php form? Took me forever just to layout the forms lol