html - modifying php email form into a smtp email form -
hi have self included email form doesn't require other scripts have run problem need send via smtp examples have seen past skill level wondering if can me
my email form this:
<html> <head> <!--[if !ie]><!--> <link rel="stylesheet" type="text/css" href="register.css"> <!--<![endif]--> </head> <body style="background-color:#303030"> <?php // display form if user has not clicked submit if (!isset($_post["submit"])) { ?> <div id="login"> <form method="post" action="<?php echo $_server["php_self"];?>"> <input type="hidden" name="subject" value="can create me account"><br/> message: <textarea rows="10" cols="40" name="message"></textarea><br/> first <input type="text" name="first_name" ><br/> last <input type="text" name="last_name" ><br/> company <input type="text" name="company" ><br/> email <input type="text" name="email" ><br/> telephone number <input type="text" name="telnr" ><br/> description <input type="text" name="description" ><br/> <input type="submit" name="submit" value="submit feedback"> </form> </div> <?php } else // user has submitted form { // check if "subject" input field filled out var_dump($_post); if (isset($_post["subject"])) { $subject = $_post["subject"]; $message = $_post["message"]; $first = $_post["first_name"]; $last = $_post["last_name"]; $company = $_post["company"]; $email = $_post["email"]; $telnr = $_post["telnr"]; $description = $_post["description"]; $therest = "first name= $first" . "\r\n" . "last name= $last" . "\r\n" . "company= $company" . "\r\n" . "email= $email" . "\r\n" . "telnr= $telnr" . "\r\n" . "description= $description"; } echo "$therest <br>"; $message = wordwrap($message, 700); $first = wordwrap($first, 70); $last = wordwrap($last, 70); mail("receiver@whatever.co.uk",$subject,$name,$therest,"subject: $subject\n"); echo "thank sending feedback"; } ?> </body> </html>
the answer no form not changed smtp
email form needed create form used phpmailer , added input boxes needed has added more development website working on server trying reach
Comments
Post a Comment