PHP - How To Make This An Email Form
Good day. I have used an open source form, but I would like to know how to make it into a functional email form (so the form values are sent to an email address). As you can see, there is already a section at the bottom for contact details and a "submit" button, but it is not working. I see that there is no value set for the form action here etc. <form action="" id="cakeform" onsubmit="return false;">
Not sure how to make this a functional email form. Any help would be appreciated. URL of form: http://kmkwebdevelopment.com/clients/test/piano-moving-estimate-uprights.html Code: [Select] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/sidebar.dwt" codeOutsideHTMLIsLocked="false" --> <head> <link rel="icon" href="favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> </head> <body> <script type="text/javascript" src="js/formcalculations.js"></script> <link href="styles/quoteform.css" rel="stylesheet" type="text/css" /> </head> <body onload='hideTotal()'> <div id="wrap"> <form action="" id="cakeform" onsubmit="return false;"> <div> <div class="cont_order"> <fieldset> <legend>Piano Moving Estimate For Upright Pianos</legend> <label ><span style="font-size:18px; color:#900">STEP 1:</span> Please select the size of your piano:</label> <img style="margin-top:15px" src="images/small-piano-upright.jpg" alt="small upright piano" /> <label style="float:right; margin-right:202px; margin-top:30px" class='radiolabel'><input type="radio" name="selectedcake" value="Round6" onclick="calculateTotal()" /> Small (Aka: Spinet, Console) <span style="font-weight:bold">$100</span></label> <br/> <img style="margin-top:15px" src="images/medium-piano-upright.jpg" alt="medium upright piano" /> <label style="float:right; margin-right:196px; margin-top:30px" class='radiolabel'><input type="radio" name="selectedcake" value="Round8" onclick="calculateTotal()" /> Medium (Aka: Studio, Upright) <span style="font-weight:bold">$120</span></label><br/> <img style="margin-top:15px" src="images/large-piano-upright.jpg" alt="large upright piano" /> <label style="float:right; margin-right:114px; margin-top:30px" class='radiolabel'><input type="radio" name="selectedcake" value="Round10" onclick="calculateTotal()" /> Large (Aka: Full Size, Cabinet/Grand Upright) <span style="font-weight:bold">$150</span></label><br/> <br/> <label ><span style="font-size:18px; color:#900">STEP 2:</span> Enter pick up and destination addresses:</label> <br/> <p style="color:#900; font-weight:bold">PICK UP LOCATION:</p> <label style="margin-left:15px; font-weight:normal" class="inlinelabel">Street Address:</label> <input style="margin-left:10px" type="text" value="" /><br /> <label style="margin-left:15px; font-weight:normal" class="inlinelabel">City:</label> <input style="margin-left:71px" type="text" value="" /> <br /><br /> <p style="color:#900; font-weight:bold">DESTINATION LOCATION:</p> <label style="margin-left:15px; font-weight:normal" class="inlinelabel">Street Address:</label> <input style="margin-left:10px" type="text" value="" /><br /> <label style="margin-left:15px; font-weight:normal" class="inlinelabel">City:</label> <input style="margin-left:71px" type="text" value="" /> <br /><br /> <label style="margin-left:15px">Approximate distance between "pickup location" and "destination"</label> <br /> <select style="margin-left:135px" id="filling" name='filling' onchange="calculateTotal()"> <option value="None">Choose Distance:</option> <option value="Lemon">1 - 10km ($30)</option> <option value="Custard">11 - 20km ($45)</option> <option value="Fudge">21 - 30km ($60)</option> <option value="Mocha">31 - 40km ($80)</option> </select> <br/><br /> <label ><span style="font-size:18px; color:#900">STEP 3:</span> Is this a player piano?</label> <br /> <select style="margin-left:135px" id="filling2" name='filling2' onchange="calculateTotal()"> <option value="Raspberry">No</option> <option value="Pineapple">Yes ($30)</option> </select> <br/><br /> <label ><span style="font-size:18px; color:#900">STEP 4:</span> Are stairs involved? If so, please select from the diagram below:</label> <br /> <select style="margin-left:135px" id="filling3" name='filling3' onchange="calculateTotal()"> <option value="None2">None</option> <option value="Dobash">Stairway A ($5)</option> <option value="Mint">Stairway B ($10)</option> <option value="Cherry">Stairway C ($15)</option> <option value="Apricot">Stairway D ($20)</option> <option value="Buttercream">Stairway E ($25)</option> </select> <br /><br /> <img src="images/stairs.jpg" alt="stairs" /> <br/><br /> <div id="totalPrice"></div> <br /> <p style="color:#000"><span style="font-size:18px; color:#900">NOTE:</span> This estimate form is to be used as a cost "approximation" only. When speaking with one of our staff, this estimate may be altered.</p> </fieldset> </div> <div class="cont_details"> <fieldset> <legend>Contact Details</legend> <label for='name'>Name</label> <input type="text" id="name" name='name' /> <br/> <label for='address'>Address</label> <input type="text" id="address" name='address' /> <br/> <label for='phonenumber'>Phone Number</label> <input type="text" id="phonenumber" name='phonenumber'/> <br/> </fieldset> </div> <input type='submit' id='submit' value='Submit' onclick="calculateTotal()" /> </div> </form> Similar TutorialsHello, I am working with a SMTP class to send an email. It's all working perfectly fine, but when the email is received (sent from the online form), and I open my email and click reply, there are two email addresses. The correct one (which I entered when I sent the email), and my ftp username for the site?? I've got three files that could effect this, but I was unable to locate any problems: mailer.php ( smtp send mail class) mail.php ( submission data: title, subject, etc. ) contact_form.php ( form for submission ) I am only including the file which I think is applicable (mail.php), but let me know if you would also like to see the mailer.php class. Current output: reply-to ftpusername@domainname.com, correct_from_email@fromemail.com mail.php: <?php set_time_limit(120); function sendHTMLmail($from, $to, $subject, $message) { $message = wordwrap($message, 70); // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= "From: $from\r\n"; // Mail it mail($to, $subject, $message, $headers); } function sendHTMLmail2($fromid, $to, $subject, $message) { echo $fromid; echo $to; echo $subject; echo $message; include_once("mailer.php"); $mail = new PHPMailer(); $mail->IsMail(); // SMTP servers $mail->Host = "localhost"; $mail->From = $fromid; $mail->FromName = $fromid; $mail->IsHTML(true); $mail->AddAddress($to, $to); $mail->Subject = $subject; $mail->Body = $message; $mail->AltBody = "Please enable HTML to read this"; $mail->Send(); exit; } function isValidEmail($email) { return eregi("^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3}$", $email); } class smtp_mail { var $host; var $port = 25; var $user; var $pass; var $debug = false; var $conn; var $result_str; var $charset = "utf-8"; var $in; var $from_r; //mail format 0=normal 1=html var $mailformat = 0; function smtp_mail($host, $port, $user, $pass, $debug = false) { $this->host = $host; $this->port = $port; $this->user = base64_encode($user); $this->pass = base64_encode($pass); $this->debug = $debug; $this->socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); if ($this->socket) { $this->result_str = "Create socket:" . socket_strerror(socket_last_error()); $this->debug_show($this->result_str); } else { exit("Initialize Faild,Check your internet seting,please"); } $this->conn = socket_connect($this->socket, $this->host, $this->port); if ($this->conn) { $this->result_str = "Create SOCKET Connect:" . socket_strerror(socket_last_error()); $this->debug_show($this->result_str); } else { exit("Initialize Faild,Check your internet seting,please"); } $this->result_str = "Server answer:<font color=#cc0000>" . socket_read($this->socket, 1024) . "</font>"; $this->debug_show($this->result_str); } function debug_show($str) { if ($this->debug) { echo $str . "<p>\r\n"; } } function send($from, $to, $subject, $body) { if ($from == "" || $to == "") { exit("type mail address please"); } if ($subject == "") $sebject = "none title"; if ($body == "") $body = "none content"; $All = "From:$from;\r\n"; $All .= "To:$to;\r\n"; $All .= "Subject:$subject;\r\n"; if ($this->mailformat == 1) { $All .= "Content-Type:text/html;\r\n"; } else { $All .= "Content-Type:text/plain;\r\n"; } $All .= "Charset:" . $this->charset . ";\r\n\r\n"; $All .= " " . $body; $this->in = "EHLO HELO\r\n"; $this->docommand(); $this->in = "AUTH LOGIN\r\n"; $this->docommand(); $this->in = $this->user . "\r\n"; $this->docommand(); $this->in = $this->pass . "\r\n"; $this->docommand(); if (!eregi("235", $this->result_str)) { $this->result_str = "smtp auth faild"; $this->debug_show($this->result_str); return 0; } $this->in = "MAIL FROM: $from\r\n"; $this->docommand(); $this->in = "RCPT TO: $to\r\n"; $this->docommand(); $this->in = "DATA\r\n"; $this->docommand(); $this->in = $All . "\r\n.\r\n"; $this->docommand(); if (!eregi("250", $this->result_str)) { $this->result_str = "Send mail faild!"; $this->debug_show($this->result_str); return 0; } $this->in = "QUIT\r\n"; $this->docommand(); socket_close($this->socket); return 1; } function docommand() { socket_write($this->socket, $this->in, strlen($this->in)); $this->debug_show("Client command:" . $this->in); $this->result_str = "server answer:<font color=#cc0000>" . socket_read($this->socket, 1024) . "</font>"; $this->debug_show($this->result_str); } } ?> Hi the user fill details and then the email his sent to me the only problem is that the emails keeps going to my spam, can someone help me out please I looked already php website and email format looks the same. This is the link to my form. http://www.people.eurico.co.uk/ here my form script Code: [Select] <?php // Set email variables $email_to = 'xxxxx@xxxxxxx.co.uk'; $email_subject = 'Call back form'; // Set required fields $required_fields = array('fullname','email','telephone','comment'); // set error messages $error_messages = array( 'fullname' => 'Please enter a Name to proceed.', 'email' => 'Please enter a valid Email.', 'telephone' => 'Please telephone.', 'comment' => 'Please enter your Message to continue.' ); // Set form status $form_complete = FALSE; // configure validation array $validation = array(); // check form submittal if(!empty($_POST)) { // Sanitise POST array foreach($_POST as $key => $value) $_POST[$key] = remove_email_injection(trim($value)); // Loop into required fields and make sure they match our needs foreach($required_fields as $field) { // the field has been submitted? if(!array_key_exists($field, $_POST)) array_push($validation, $field); // check there is information in the field? if($_POST[$field] == '') array_push($validation, $field); // validate the email address supplied if($field == 'email') if(!validate_email_address($_POST[$field])) array_push($validation, $field); } // basic validation result if(count($validation) == 0) { // Prepare our content string $email_content = 'peoplesmartlearning.co.uk: ' . "\n\n"; // simple email content foreach($_POST as $key => $value) { if($key != 'submit') $email_content .= $key . ': ' . $value . "\n"; } // if validation passed ok then send the email mail($email_to, $email_subject, $email_content); // Update form switch $form_complete = TRUE; } } function validate_email_address($email = FALSE) { return (preg_match('/^[^@\s]+@([-a-z0-9]+\.)+[a-z]{2,}$/i', $email))? TRUE : FALSE; } function remove_email_injection($field = FALSE) { return (str_ireplace(array("\r", "\n", "%0a", "%0d", "Content-Type:", "bcc:","to:","cc:"), '', $field)); } ?> The HTML Code: [Select] <div class="call_us_form"> <p class="title">WE'LL CALL YOU BACK</p> <?php if($form_complete === FALSE): ?> <form class="contact_form" id="fm-form" method="post" action="index.php" > <fieldset> <div class="fm-req"> <label for="fm-firstname">Name</label> <input type="text" id="fullname" class="detail" name="fullname" value="<?php echo isset($_POST['fullname'])? $_POST['fullname'] : ''; ?>" /> <?php if(in_array('fullname', $validation)): ?><script type="text/javascript">alert("Please enter a Name"); history.back();</script><?php endif; ?> </div> <div class="fm-req"> <label for="fm-firstname">Email</label> <input type="text" id="email" class="detail" name="email" value=" <?php echo isset($_POST['email'])? $_POST['email'] : ''; ?>" /> <?php if(in_array('email', $validation)): ?><script type="text/javascript">alert("Please enter a valid Email Address"); history.back();</script><?php endif; ?> </div> <div class="fm-req"> <label for="fm-firstname">Number</label> <input type="text" id="telephone" class="detail" name="telephone" value="<?php echo isset($_POST['telephone'])? $_POST['telephone'] : ''; ?>" /> <?php if(in_array('telephone', $validation)): ?><script type="text/javascript">alert("Please enter telephone number"); history.back();</script><?php endif; ?> </div> <div class="fm-req"> <label for="fm-lastname">Message</label> <textarea cols="40" rows="5" id="comment" name="comment" class="mess"><?php echo isset($_POST['comment'])? $_POST['comment'] : ''; ?></textarea> <?php if(in_array('comment', $validation)): ?><script type="text/javascript">alert("Please enter your message"); history.back();</script><?php endif; ?> </div> <input class="submit_button" type="submit" value="Call us" /> </fieldset> </form> <?php else: ?> <p>Thank you for your Message!</p> <p>We will get back to you as soon as we can</p> <script type="text/javascript"> setTimeout ('ourRedirect()', 5000) function ourRedirect () { location.href='index.php' } </script> <?php endif; ?> how to make 2FA Authentication by sms, call voice or email, i want to to make a step 2 for security in my application si If a login to myaccount is attempted i want to initiate 2fa with choice of SMS , email or call with PIN then to validate it are there any PHP frameworks or services Open Source or paid that could deliver this functionality for me? i found Nexmo sms but it is for sms only and twilio authy.. does any one have any reccomndation? Hi, I am using the following PHP email code, and when I send it to my Gmail account it works fine, but some servers are blocking this email and are not being received. How can I tweak it to make it more compatible? Code: [Select] $headers = "From: $row_o_email[email] \r\n"; $headers .= "BCC: $row_o_email[email] \r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $to = $row_e['email']; mail($to, "subject", " email body ", $headers); This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=349030.0 I'm a beginner in PHP I was wondering if this is easy to do or if i'd have to outsource this to a programmer - Basically when a user fills in the PHP Form and submits it I need this to generate as a PDF which will then email/attach to MY email and NOT the user who submitted this form. I have looked at tcpdf, fpdi but i dont think any of those scripts allow me to do this specifically as from what i heard it generates a download link for the user, and that is not what i need. If anyone can help me it would be greatly appreciated. Hi, I have a regular MySQL query that displays it's results to the screen in a browser as an HTML table, all nice and fruity. The managers who use this function like to send out the results to staff, currently they simply take a screen shot and paste it into an email to send out to everyone - quite an overhead on the email system, company network, not to mention the time taken to do the screen shot and paste it into an email in the first place. It would be good if I could include a standard HTML form button (preferably) or link on the results page to shove the displayed results to Outlook as an email, that contains the table all ready for the manager to add in what ever they want to the email and then send (usually to 'all@mysite.com' but it would be useful if they could change or add to this as they see fit). This is kind of what happens with a normal mailto HTML tag, except I want it to contain the MySQL query result too. This is the existing table output routine (something I inherited): Code: [Select] /* Output data into a HTMl table */ echo "<p>"; echo "<table align=center width=800 border=\"1\">"; echo "<tr>"; echo "<td BGCOLOR=\"#ffcc00\"><strong>Agent name</strong></td> <td BGCOLOR=\"#ffcc00\"><strong>Number of calls made / handled</strong></td> <td BGCOLOR=\"#ffcc00\"><strong>Average call minutes</strong></td> <td BGCOLOR=\"#ffcc00\"><strong>Total mins (inc hours + secs rounded)</strong></td> </tr>"; while($row = mysql_fetch_row($numresults)) { echo "<tr>"; for($i=0; $i < mysql_num_fields($numresults); $i++) { echo "<td align=center width=443>$row[$i]</td>"; } echo "</tr>\n"; } echo "</table></p>"; Hi all, What I am trying to achieve is, I thought quite simple! Basically, a user signs up and chooses a package, form is submitted, details added to the database, email sent to customer, then I want to direct them to a paypal payment screen, this is where I am having issues! Is their any way in php to submit a form without user interaction? Here is my code for the form process page Code: [Select] <?php include('config.php'); require('scripts/class.phpmailer.php'); $package = $_POST['select1']; $name = $_POST['name']; $email = $_POST['email']; $password = md5($_POST['password']); $domain = $_POST['domain']; $a_username = $_POST['a_username']; $a_password = $_POST['a_password']; $query=mysql_query("INSERT INTO orders (package, name, email, password, domain, a_username, a_password) VALUES ('$package', '$name', '$email', '$password', '$domain', '$a_username', '$a_password')"); if (!$query) { echo "fail<br>"; echo mysql_error(); } else { $id = mysql_insert_id(); $query1=mysql_query("INSERT INTO customers (id, name, email, password) values ('$id', '$name', '$email', '$password')"); if (!$query1) { echo "fail<br>"; echo mysql_error(); } if($package=="Reseller Hosting") { //email stuff here - all works - just cutting it to keep the code short if(!$mail->Send()) { echo "Message could not be sent. <p>"; echo "Mailer Error: " . $mail->ErrorInfo; exit; } ?> <form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick-subscriptions"> <input type="hidden" name="business" value="subscription@jollyhosting.com"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="item_name" value="Jolly Hosting Reseller Packages"> <input type="hidden" name="no_shipping" value="1"> <!--1st month --> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="a3" value="3.00"> <input type="hidden" name="p3" value="1"> <input type="hidden" name="t3" value="M"> <input type="hidden" name="src" value="1"> <input type="hidden" name="sra" value="1"> </form>'; <?php } //last } //end ?> i wanting users to be able to update there email address and check to see if the new email already exists. if the email is the same as current email ignore the check. i have no errors showing up but if I enter a email already in the db it still accepts the new email instead of bringing the back the error message. Code: [Select] // email enterd from form // $email=$_POST['email']; $queryuser=mysql_query("SELECT * FROM members WHERE inv='$ivn' ") or die (mysql_error()); while($info = mysql_fetch_array( $queryuser )) { $check=$info['email']; // gets current email // } if($check!=$email){ // if check not equal to $email check the new email address already exists// $queryuser=mysql_query("SELECT * FROM members WHERE email='$email' "); //$result=mysql_query($sql); $checkuser=mysql_num_rows($queryuser); if($checkuser != 0) { $error= "0"; header('LOCATION:../pages/myprofile.php?id='.$error.''); } } cheers As the topis says, I need help with an email form. You must have valid email address to go further, so lets say you write asdada as email, you won't be able to register the account, you must have asdada@hotmai.com or something like that. If anyone knows it would be awesome! Hi there, As the question says i tried several things but i can't work it out and my knowledge about php isn't that well. Hello phpfreaks.com, ive been wondering all week howto do so. If i make a mysql_query and chooses all emails, i only get my own. But how can i choose all the users registered in the database`? best regards William Pfaffe Hi, Im sort of new to PHP. I currently have this code Code: [Select] if(!empty($myrow['email'])){ echo "<a href=\"mailto: ".$myrow['email']."\">".$myrow['email']; echo "</a><br>";}Which just displays a email from the database and when clicked opens Outlook or some other email program. What i'm trying to do is hide the email and in its place put a link like "Contact" or a simple form that would send a email from my website to that email address. Does any one know any links to tutorials or at least a name for a script that would allow me to do this? Cheers! Im having trouble getting this form to work on my website. It all seems to work ok, however when i test it, i dont recieve any emails to my inbox. Godaddy seems to think that I am connecting to their server in the correct manner, but say that they cannot advise on customers codeing issues. I thought that somebody in this forum maybe able to give me some pointers? [<?php ini_set('sendmail_from', 'user@domain.tld'); ini_set('SMTP', 'relay-hosting.secureserver.net'); $subject = $_POST["subject"]; $message = $_POST["message"]; $from = $_POST["from"]; $name = $_POST["name"]; $phone = $_POST["phone"]; $verif_box = $_POST["verif_box"]; $subject = stripslashes($subject); $message = stripslashes($message); $from = stripslashes($from); $name = stripslashes($name); $phone = stripslashes($phone); $embody = "$name $phone $message"; if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']){ mail("ed@treework.net", 'Online Form: '.$subject, $_SERVER['REMOTE_ADDR'].$embody, "From: $from"); setcookie('tntcon',''); } else if(isset($message) and $message!=""){ header("Location:".$_SERVER['HTTP_REFERER']."?subject=$subject&from=$from&message=$message&wrong_code=true"); exit; } else { echo "no variables received, this page cannot be accessed directly"; exit; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>E-Mail Sent</title> <style type="text/css"> <!-- body,td,th { font-family: Arial, Helvetica, sans-serif; font-size: 12px; } --> </style></head> <body> Email sent. Thank you.<br /> <br /> Return to <a href="/">home page</a> ? </body> </html>] To PHPBuilder Forumgoers, My PHP email form is not sending to the address I specified, and I think it's because I added in an if-else statement to check for input of a valid email address. I've put the HTML and PHP scripts online and filled the live form out with several valid email addresses, with no success. I tried changing the recipient's email, too, with no success. Am I missing a glaring error in my code, or maybe things are just not in the right order? Any help would be SUPER appreciated. Thank you so much. The code (in external PHP file "order.php") : <?php $to = "myemailwashere@website.com"; $subject = "Custom Order Message"; $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; $from = $_REQUEST['name']; $budget = $_REQUEST['budget']; $colors[] = $_REQUEST['colors[]']; $headers = "From: $email"; $sent = mail($to, $from, $subject, $message, $budget, $headers) ; if( !eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*". "@([a-z0-9]+([\.-][a-z0-9]+))*$",$email)) { header( 'Location: order/invalidemail.html' ) ; }else{ header( 'Location: order/messagesent.html' ) ; } if($sent) {print "Your custom order query was sent successfully."; } else {print "An error occured while sending your custom order query. Please try again."; } ?> dear friends , i have this html page "</head> <body> <table width="93%" border="0" align="center" cellpadding="2" cellspacing="4"> <tr> <td height="35" colspan="3" valign="top" class="heading" style="padding-top:8px; color:#448B9A; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold;"><strong>Contact Us :</strong></td> </tr> <tr> <td width="36%" class="body">Your Name:</td> <td width="64%" colspan="2"> <input type="text" name="textfield3" style="width:250px; height:13px;" size="20" /></td> </tr> <tr> <td class="body">Address:</td> <td colspan="2"> <input type="text" name="textfield32" style="width:250px; height:13px;" size="20" /></td> </tr> <tr> <td class="body">City:</td> <td colspan="2"> <input type="text" name="textfield33" style="width:250px; height:13px;" size="20" /></td> </tr> <tr> <td class="body"> Country:</td> <td colspan="2"> <input type="text" name="textfield34" style="width:250px; height:13px;" size="20" /></td> </tr> <tr> <td class="body">Phone no:</td> <td colspan="2"> <input type="text" name="textfield35" style="width:250px; height:13px;" size="20" /></td> </tr> <tr> <td class="body">email Address:</td> <td colspan="2"> <input type="text" name="textfield36" style="width:250px; height:13px;" size="20" /></td> </tr> <tr> <td class="body">Comments:</td> <td colspan="2"><textarea name="textarea" rows="5" cols="" style="width:250px;"></textarea></td> </tr> <tr> <td> </td> <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="28%"> <input type="image" name="imageField2" src="/images/submit.gif" width="62" height="22" /></td> <td width="72%"> <input type="image" name="imageField3" src="/images/reset.gif" width="62" height="22" /></td> </tr> </table></td> </tr> </table> </body> </html> " how i can use this to send email to my email address John@gmail.com thru site when someone submit the form [attachment deleted by admin] Ok I have two separate issues. The first is that I want to format the email so that the titles of the form areas are bolded (i.e., Name: Title:, etc...) the second issue is that I don't want the email to contain the blank fields (I.e. witness 2 etc.. if left empty) any help is appreciated here is my code Code: [Select] <p class="style2"><span class="style5"><strong>Incident / Unusual Occurrence Report</strong></span><br> Danville Area Community College<br><br> REPORT FORM</p> <table width="481" height="657" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td rowspan="2" valign="top" bgcolor="#FFFFFF" style="width: 481px"> <p align="center"class="style3"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <?php $problems = array(); $showform = 0; $errorMessage = ""; function validate($field, $value) { // || $field == "id" || $field == "phone" || $field == "course" || $field == "instructor" /*if ($field == "name" || $field == "email" || $field == "computers" || $field == "info") {*/ if ($value == "") { return 0; } else { return 1; } /*}*/ /*if ($field == "system" || $field == "browser" || $field == "issue" || $field == "multiple") { if ($value == "----" || $value == "") { return 0; } else { return 1; } }*/ } if($_POST) { //'id','phone','course','instructor', $fields = array('name','title', 'date', 'time', 'building', 'room', 'location', 'person', 'title1', 'phone1', 'explanation', 'security', 'police', 'witness', 'acttaken', 'followact'); $x = 0 - 1; foreach($fields as $field) { if(isset($_POST[$field])) { $validation = validate($field, $_POST[$field]); if ($validation == 1) { $x++; $info[$x] = $_POST[$field]; } else { $problems[$field] = 1; $showform = 1; } } else { $problems[$field] = 1; $showform = 1; } } } else { $showform = 1; } if(count($problems) < 1 && $_POST) { // DO THE MAILING HERE $fields = array('title', 'name','date', 'time', 'building', 'room', 'location', 'title1','person', 'phone1', 'title2', 'person2', 'phone2','title3','person3', 'phone3','title4','person4', 'phone4', 'type1', 'type2', 'type3', 'type4', 'type5', 'type6', 'type7', 'type8', 'type9', 'explanation', 'security', 'police', 'witness','wtitle1', 'wperson', 'wphone1', 'wtitle2', 'wperson2', 'wphone2','wtitle3','wperson3', 'wphone3', 'acttaken', 'followact'); $to = "ampeck@earthlink.net"; $to2 = "aabdelzaher@dacc.edu"; $subject = "Incident / Unusual Occurrence Report"; $headers = "From: noreply@dacc.edu\r\n" . "X-Mailer: php"; $greet = "The following was submitted on " . date("F j, Y, g:i a") . "\n\n"; $body = $greet ; $cn = 1; foreach($fields as $efield) { if(isset($_POST[$efield])) { if($efield == "type1" || $efield == "type2" || $efield == "type3" || $efield == "type4" || $efield == "type5" || $efield == "type6" || $efield == "type7" || $efield == "type8" || $efield == "type9" ) { $body.= "Type of Occurrence:" . $_POST[$efield] . "\n\n"; $cn++; } elseif($efield == "title") { $body.= "Name of Person Filing Report: " . $_POST[$efield] . " "; } elseif($efield == "name") { $body.= " " . $_POST[$efield] . "\n________________________________________\n\n"; } elseif($efield == "date") { $body.= "Date of Occurrence: " . $_POST[$efield] . " \t "; } elseif ($efield == "time") { $body.= "Time: " . $_POST[$efield] . "\n________________________________________\n\n"; } elseif ($efield == "building") { $body.= "Building: " . $_POST[$efield] . " \t\t "; } elseif ($efield == "room") { $body.= "Room: " . $_POST[$efield] . "\n\n"; } elseif ($efield == "location") { $body.= "Description of Location: " . $_POST[$efield] . "\t\r\n________________________________________\n\n"; } elseif ($efield == "title1") { $body.= "First Person involved: " . $_POST[$efield] . " "; } elseif ($efield == "person") { $body.= " \t" . $_POST[$efield] . "\n"; } elseif ($efield == "phone1") { $body.= "Phone : " . $_POST[$efield] . "\n________________________________________\n\n"; }elseif ($efield == "title2") { $body.= "Second Person involved: " . $_POST[$efield] . " "; } elseif ($efield == "person2") { $body.= " " . $_POST[$efield] . "\n"; } elseif ($efield == "phone2") { $body.= "Phone : " . $_POST[$efield] . "\n________________________________________\n\n"; } elseif ($efield == "title3") { $body.= "Third Person involved: " . $_POST[$efield] . " "; } elseif ($efield == "person3") { $body.= " " . $_POST[$efield] . "\n"; } elseif ($efield == "phone3") { $body.= "Phone: " . $_POST[$efield] . "\n________________________________________\n\n"; } elseif ($efield == "title4") { $body.= "Fourth Person Involved: " . $_POST[$efield] . " "; } elseif ($efield == "person4") { $body.= " " . $_POST[$efield] . " \n"; } elseif ($efield == "phone4") { $body.= "Phone: " . $_POST[$efield] . "\n________________________________________\n\n"; } elseif ($efield == "explanation") { $body.= "Detailed Explanation: " . $_POST[$efield] . "\t\r\n________________________________________\n\n"; } elseif ($efield == "security") { $body.= "Security called: " . $_POST[$efield] . "\n\n"; } elseif ($efield == "police") { $body.= "Police called: " . $_POST[$efield] . "\n\n"; } elseif ($efield == "witness") { $body.= "Were there witnesses: " . $_POST[$efield] . "\n________________________________________\n\n"; } elseif($efield == "wtitle1") { $body.= "Witness: " . $_POST[$efield] . " "; } elseif ($efield == "wperson") { $body.= " \t" . $_POST[$efield] . "\n"; } elseif ($efield == "wphone1") { $body.= "Phone : " . $_POST[$efield] . "\n________________________________________\n\n"; }elseif ($efield == "wtitle2") { $body.= "Second witness: " . $_POST[$efield] . " "; } elseif ($efield == "wperson2") { $body.= " " . $_POST[$efield] . "\n"; } elseif ($efield == "wphone2") { $body.= "Phone : " . $_POST[$efield] . "\n________________________________________\n\n"; } elseif ($efield == "wtitle3") { $body.= "Third witness: " . $_POST[$efield] . " "; } elseif ($efield == "wperson3") { $body.= " " . $_POST[$efield] . "\n"; } elseif ($efield == "wphone3") { $body.= "Phone: " . $_POST[$efield] . "\n________________________________________\n\n"; } elseif ($efield == "acttaken") { $body.= "Immediate Action Taken: " . $_POST[$efield] . "\t\r\n________________________________________\n\n"; } elseif ($efield == "followact") { $body.= "What Follow-up Action will be taken: " . $_POST[$efield] . "\t\r\n________________________________________\n\n"; } } } mail($to, $subject, $body, $headers); mail($to2, $subject, $body, $headers); ?> <p class="style1">Your report has been submitted.<br><br></p> <?php } if($showform == 1) { ?> <?php if(count($problems) > 0) { ?> <p><strong><font color="red">PLEASE CORRECT ANY FIELDS WITH A RED * BY THEM</font></strong></p> <?php } ?> <form action="" method="post"> <fieldset> <legend> <span lang="en-us">Incident Report</span> </legend> <div class="style6"> <div class="style7"> <br> <table style="width: 100%"> <tr> <td style="width: 248px" class="style1"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <label class="formtext" for="name">Name(s): <?php if(isset($problems['name'])) {?><font color="red">*</font><?php } ?></label><br> <input class="inputstyle" type="text" name="name" value="<?php if(isset($_POST['name'])){ print($_POST['name']); }?>" style=" width: 288px"></font></td> <td style="width: 148px" class="style1"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <label class="formtext" for="title">Title: <?php if(isset($problems['title'])) {?><font color="red">*</font><?php } ?></label><br> <input class="style6" type="text" name="title" value="<?php if(isset($_POST['title'])){ print($_POST['title']); }?>" style=" width: 132px"></font></td> </tr> </table><p></p> <table > <tr> <td style="width: 132px"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <label class="formtext" for="date">Date of Occurrence: <?php if(isset($problems['date'])) {?><font color="red">*</font><?php } ?></label><br> <input class="inputstyle" type="text" name="date" value="<?php if(isset($_POST['date'])){ print($_POST['date']); }?>" style=" width: 118px"></font></td> <td style="width: 170px"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <label class="formtext" for="time">Time of Occurrence: <?php if(isset($problems['time'])) {?><font color="red">*</font><?php } ?></label><br> <input class="inputstyle" type="text" name="time" value="<?php if(isset($_POST['time'])){ print($_POST['time']); }?>" style=" width: 88px"></font></td> <td style="width: 111px"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <label class="formtext" for="building">Building: <?php if(isset($problems['building'])) {?><font color="red">*</font><?php } ?></label><br> <input class="inputstyle" type="text" name="building" value="<?php if(isset($_POST['building'])){ print($_POST['building']); }?>" style=" width: 110px"></font></td> <td style="width:100px"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <label class="formtext" for="room">Room: <?php if(isset($problems['room'])) {?><font color="red">*</font><?php } ?></label><br> <input class="inputstyle" type="text" name="room" value="<?php if(isset($_POST['room'])){ print($_POST['room']); }?>" style=" width: 60px"></font></td> </tr> </table> <table style="width: 100%; height: 72px;"> <tr> <td class="style1"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <label class="formtext" for="location">Location Description: <?php if(isset($problems['location'])) {?><font color="red">*</font><?php } ?></label><br> <textarea name="location" style=" width: 383px; height: 115px;" ></textarea></font><br></td> </tr> </table> <br> <p class="style5">Person (s) involved in incident</p> <table > <tr> <td style="width: 200px"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <span lang="en-us"> <label class="formtext" for="person">Name:<?php if(isset($problems['person'])) {?><font color="red">*</font><?php } ?></label></span><br> <input class="inputstyle" type="text" name="person" value="<?php if(isset($_POST['person'])){ print($_POST['person']); }?>" style="width: 249px"></font></td> <td style="width: 114px"><label class="formtext" for="title1"> <span lang="en-us">Title</span>:</label><br> <font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <input class="inputstyle" type="text" name="title1" value="<?php if(isset($_POST['title1'])){ print($_POST['title1']); }?>" style=" width: 100px"></font></td> <td style="width: 104px"><label class="formtext" for="phone1"> <span lang="en-us">Phone</span>:</label><br> <input class="inputstyle" type="text" name="phone1" value="<?php if(isset($_POST['phone1'])){ print($_POST['phone1']); }?>" style="width: 75px"></td> </tr> <tr> <td style="width: 224px"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <input type="text" name="person2" value="<?php if(isset($_POST['person2'])){ print($_POST['person2']); }?>" style="width: 249px" style="width: 249px"></font></td> <td style="width: 114px"> <input class="inputstyle" type="text" name="title2" value="<?php if(isset($_POST['title2'])){ print($_POST['title2']); }?>" style="width: 100px"></td> <td style="width: 104px"> <input class="inputstyle" type="text" name="phone2" value="<?php if(isset($_POST['phone3'])){ print($_POST['phone3']); }?>" style="width: 75px"></td></tr> <tr> <td style="width: 224px; height: 26px;"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <input class="inputstyle" type="text" name="person3" value="<?php if(isset($_POST['person3'])){ print($_POST['person3']); }?>" style="width: 252px"></font></td> <td style="width: 114px; height: 26px;"> <input class="inputstyle" type="text" name="title3" value="<?php if(isset($_POST['title3'])){ print($_POST['title3']); }?>" style=" width: 100px"></td> <td style="width: 104px"> <input class="inputstyle" type="text" name="phone3" value="<?php if(isset($_POST['phone3'])){ print($_POST['phone3']); }?>" style=" width: 75px"></td></tr> <tr> <td style="width: 224px"> <input class="inputstyle" type="text" name="person4" value="<?php if(isset($_POST['person4'])){ print($_POST['person4']); }?>" style=" width: 252px"></td> <td style="width: 114px; height: 26px;"> <input class="inputstyle" type="text" name="title4" value="<?php if(isset($_POST['title4'])){ print($_POST['title4']); }?>" style=" width: 100px"></td> <td style="width: 104px"> <input class="inputstyle" type="text" name="phone4" value="<?php if(isset($_POST['phone4'])){ print($_POST['phone4']); }?>" style=" width: 75px"></td></tr> </table><fieldset> <legend> Please Select at least one: </legend> <p class="style5">Type of Alleged Occurrence:</p> <font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <table style="width: 100%"> <tr> <td style="width: 33%; height: 57px;"><input class="inputstyle" type="checkbox" name="type1" value="Disgruntled Action"><label class="formtext" for="type1">Disgruntled Action</label><br></td> <td style="width: 33%; height: 57px;"> <input class="inputstyle" type="checkbox" name="type2" value="Obscene Language"><label class="formtext" for="type2">Obscene Language</label><br></td> <td style="width: 33%; height: 57px;"><input class="inputstyle" type="checkbox" name="type3" value="Verbal Threats"><label class="formtext" for="type3">Verbal Threats</label><br></td> </tr> <tr> <td style="width: 33%; height: 57px;"><input class="inputstyle" type="checkbox" name="type4" value="Physical Threats"><label class="formtext" for="type4">Physical Threats<br></label><br></td> <td style="width: 33%; height: 57px;"><input class="inputstyle" type="checkbox" name="type5" value="Inappropriate Physical Behavior"><label class="formtext" for="type5">Inappropriate Physical <span lang="en-us"> </span>Behavior</label><br></td> <td style="width: 33%; height: 57px;"><input class="inputstyle" type="checkbox" name="type6" value="Written Threat"><label class="formtext" for="type6">Written Threat<br></label></td> </tr> <tr> <td style="width: 33%; height: 57px;"><input class="inputstyle" type="checkbox" name="type7" value="Sexual Offense"><label class="formtext" for="type7">Sexual Offense<br></label></td> <td style="width: 33%; height: 57px;"><input class="inputstyle" type="checkbox" name="type8" value="Robbery or Other Crime"><label class="formtext" for="type8">Robbery or Other <span lang="en-us"> <br> </span>Crimes</label><br></td> <td style="width: 33%; height: 57px;" class="style6"><input class="inputstyle" type="checkbox" name="type9" value="Other"><label class="formtext" for="type9">Other</label><br> <br> </td></div> </tr> </table><p></p> </font><table style="width: 100%; height: 72px;"> <tr> <td class="style1"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <label class="formtext" for="explanation">Detailed Explanation: <?php if(isset($problems['explanation'])) {?><font color="red">*</font><?php } ?></label><br> <textarea name="explanation" style=" width: 450px; height: 220px;" ></textarea></font><br></td> </tr> </table> </fieldset><br><br> <br> <fieldset> <legend> Actions Taken: </legend> <div class="style7"> <br> <label class="formtext" for="security"><?php if(isset($problems['security'])) {?><font color="red">*</font><?php } ?>Was Security Notified:</label> <select name="security" class="dropdownstyle"> <option value="">--Choose one--</option> <option value="Yes">Yes</option> <option value="No">No</option></select><br><br> <label class="formtext" for="police"><?php if(isset($problems['police'])) {?><font color="red">*</font><?php } ?>Were Police Notified:</label> <select name="police" class="dropdownstyle"> <option value="">--Choose one--</option> <option value="Yes">Yes</option> <option value="No">No</option></select><br><br> <label class="formtext" for="witness"><?php if(isset($problems['witness'])) {?><font color="red">*</font><?php } ?>Were there Witnesses?<br> (if yes, list names of witnesses):<span lang="en-us"> </span></label> <select name="witness" class="dropdownstyle"> <option value="">--Choose one--</option> <option value="Yes">Yes</option> <option value="No">No</option></select><br> <p class="style5">Witnesses to the Incident:</p> <table > <tr> <td style="width: 200px"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <span lang="en-us"> <label class="formtext" for="wperson">Name:</label></span><br> <input class="inputstyle" type="text" name="wperson" value="<?php if(isset($_POST['wperson'])){ print($_POST['wperson']); }?>" style="width: 249px"></font></td> <td style="width: 114px"><label class="formtext" for="wtitle1"> <span lang="en-us">Title</span>:</label><br> <font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <input class="inputstyle" type="text" name="wtitle1" value="<?php if(isset($_POST['wtitle1'])){ print($_POST['wtitle1']); }?>" style=" width: 100px"></font></td> <td style="width: 104px"><label class="formtext" for="wphone1"> <span lang="en-us">Phone</span>:</label><br> <input class="inputstyle" type="text" name="wphone1" value="<?php if(isset($_POST['wphone1'])){ print($_POST['wphone1']); }?>" style="width: 75px"></td> </tr> <tr> <td style="width: 224px"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <input type="text" name="wperson2" value="<?php if(isset($_POST['wperson2'])){ print($_POST['wperson2']); }?>" style="width: 249px; width : 249px"></font></td> <td style="width: 114px"> <input class="inputstyle" type="text" name="wtitle2" value="<?php if(isset($_POST['wtitle2'])){ print($_POST['wtitle2']); }?>" style="width: 100px"></td> <td style="width: 104px"> <input class="inputstyle" type="text" name="wphone2" value="<?php if(isset($_POST['wphone3'])){ print($_POST['wphone3']); }?>" style="width: 75px"></td></tr> <tr> <td style="width: 224px; height: 26px;"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <input class="inputstyle" type="text" name="wperson3" value="<?php if(isset($_POST['wperson3'])){ print($_POST['wperson3']); }?>" style="width: 252px"></font></td> <td style="width: 114px; height: 26px;"> <input class="inputstyle" type="text" name="wtitle3" value="<?php if(isset($_POST['wtitle3'])){ print($_POST['wtitle3']); }?>" style=" width: 100px"></td> <td style="width: 104px"> <input class="inputstyle" type="text" name="wphone3" value="<?php if(isset($_POST['wphone3'])){ print($_POST['wphone3']); }?>" style=" width: 75px"></td></tr> </table></div></fieldset> <br><br><table style="width: 100%; height: 72px;"> <tr> <td class="style1"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <label class="formtext" for="acttaken">Immediate Action Taken: <?php if(isset($problems['acttaken'])) {?><font color="red">*</font><?php } ?></label><br> <textarea name="acttaken" style=" width: 450px; height: 220px;" ></textarea></font><br></td> </tr> </table> <br><br> <table style="width: 100%; height: 72px;"> <tr> <td class="style1"><font size="-1" face="Arial, Helvetica, sans-serif" align="left"> <label class="formtext" for="followact">Follow-up Action Taken: <?php if(isset($problems['followact'])) {?><font color="red">*</font><?php } ?></label><br> <textarea name="followact" style=" width: 450px; height: 220px;" ></textarea></font><br></td> </tr> </table> Hi, My contact form is not sending all content. Specifically, the dates for 'birthday' and 'anniversary' is not coming through correctly. The day works fine, but the month and year is not working. This is the code I am using above head <?php //If the form is submitted if(isset($_POST['submit'])) { //Check to make sure that the name field is not empty if(trim($_POST['contactname']) == '') { $hasError = true; } else { $name = trim($_POST['contactname']); } //Check to make sure sure that a valid email address is submitted if(trim($_POST['email']) == '') { $hasError = true; } else if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", trim($_POST['email']))) { $hasError = true; } else { $email = trim($_POST['email']); } //Check to make sure that the subject field is not empty if(trim($_POST['birthday']) == '') { $hasError = true; } else { $birthday = trim($_POST['']); } //Check to make sure comments were entered if(trim($_POST['anniversary']) == '') { $hasError = true; } else { $anniversary = trim($_POST['anniversary']); } //If there is no error, send the email if(!isset($hasError)) { $emailTo = 'info@mywebsite.co.uk'; //Put your own email address here $body = "Name: $name \n\nEmail: $email \n\nBirthday: $birthday \n\nAnniversary: $anniversary"; $headers = 'From: http://www.mywebsite.co.uk <'.$emailTo.'>' . "\r\n" . 'Reply-To: ' . $email; mail($emailTo, $subject, $body, $headers); $emailSent = true; } } ?> This is what I am using in the body <?php if(isset($hasError)) { //If errors are found ?> <p class="error">Please check if you've filled all the fields with valid information. Thank you.</p> <?php } ?> <?php if(isset($emailSent) && $emailSent == true) { //If email is sent ?> <p><strong>Email Successfully Sent!</strong></p> <p>Thank you <strong><?php echo $name;?></strong> for using my contacting mywebsiteco.uk Your email was successfully sent. We will be in touch with you soon.</p> <?php } ?> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" id="contactform"> <div> <label for="name"><strong>Name:</strong></label> <input type="text" size="50" name="contactname" id="contactname" value="" class="required" /> </div> <div> <label for="email"><strong>Email:</strong></label> <input type="text" size="50" name="email" id="email" value="" class="required email" /> </div> <div> <p><label for="birthday"><strong>Birthday:</strong></label> <select name="birthday" id="birthday"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select> <select name="b_month" id="b_month"> <option value="1">January</option> <option value="2">February</option> <option value="3">March</option> <option value="4">April</option> <option value="5">May</option> <option value="6">June</option> <option value="7">July</option> <option value="8">August</option> <option value="9">September</option> <option value="10">October</option> <option value="11">November</option> <option value="12">December</option> </select> </p> </div> <div> <label for="anniversary"><strong>Anniversary:</strong></label> <select name="anniversary" id="anniversary"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select> <select name="anni_month" id="anni_month"> <option value="1">January</option> <option value="2">February</option> <option value="3">March</option> <option value="4">April</option> <option value="5">May</option> <option value="6">June</option> <option value="7">July</option> <option value="8">August</option> <option value="9">September</option> <option value="10">October</option> <option value="11">November</option> <option value="12">December</option> </select> <select name="anni_year" id="anni_year"> <option value="1979">1979</option> <option value="1980">1980</option> <option value="1981">1981</option> <option value="1982">1982</option> <option value="1983">1983</option> <option value="1984">1984</option> <option value="1985">1985</option> <option value="1986">1986</option> <option value="1987">1987</option> <option value="1988">1988</option> <option value="1989">1989</option> <option value="1990">1990</option> <option value="1991">1991</option> <option value="1992">1992</option> <option value="1993">1993</option> <option value="1994">1994</option> <option value="1995">1995</option> <option value="1996">1996</option> <option value="1997">1997</option> <option value="1998">1998</option> <option value="1999">1999</option> <option value="2000">2000</option> <option value="2001">2001</option> <option value="2002">2002</option> <option value="2003">2003</option> <option value="2004">2004</option> <option value="2005">2005</option> <option value="2006">2006</option> <option value="2007">2007</option> <option value="2008">2008</option> <option value="2009">2009</option> </select> </div> <input type="submit" value="Send Message" name="submit" link="#"/> </form> Please help. Thanks First I am not a developer. I am just trying to reverse engineer the existing php form. This is the test page that I have setup. http://www.absenteehomeowners.com/arrival/index-test.php Currently the form emails the form information to a specific email address. I am trying to add the function of where if the user provides an email address then the information is also sent to the user. Here are the pages that I think are involved. |