November 24, 200818 yr OK, sorry for this noob question, but its very advance for me, I am creating web site for my virtual airline company and stuck on input field , so i'll send you html code of that imput field from my template, so if can someone just help me and prepare me that code to send mail..and yes I use dW CS3 and doing static page HTML Greets Bojan The code is : <form action="" id="form"> <table width="515" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" width="267" height="100%"> <table width="1" border="0" cellspacing="0" cellpadding="0" style="height:100%;"> <tr> <td valign="top" nowrap style="padding:4px 5px 0px 0px;">Your Name:</td> <td valign="top"><input type="text" class="input_1"></td> </tr> <tr> <td valign="top" nowrap style="padding:4px 5px 0px 0px;">Telephone:</td> <td valign="top"><input type="text" class="input_1"></td> </tr> <tr> <td valign="top" nowrap style="padding:4px 5px 0px 0px;">E-mail:</td> <td valign="top"><input type="text" class="input_1"></td> </tr> </table> </td> <td valign="top" style="padding:4px 5px 0px 0px;">Message:</td> <td valign="top"><textarea rows="3" cols="3"></textarea></td> </tr> <tr><td> </td><td> </td><td valign="top" style="padding:6px 0px 0px 0px; "> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td width="100%"><img src="images/spacer.gif" width="1" height="1" alt=""></td> <td nowrap valign="top"><span><a href="#" onclick="document.getElementById('form').reset()">reset</a></span><img src="images/marker_1.gif" width="12" height="14" alt="" align="middle" hspace="6"></td> <td><img src="images/spacer.gif" width="21" height="1" alt=""></td> <td nowrap valign="top"align="right"><span><a href="#" onclick="document.getElementById('form').submit()">submit</a></span><img src="images/marker_1.gif" width="12" height="14" alt="" align="middle" hspace="6"></td> </tr> </table> </td></tr> </table> </form> Abd it looks like this: Edited February 11, 201016 yr by Sam G added [code] tags
November 25, 200818 yr are you wanting to email the whole form that is submitted? try this <form action="mailto:you@you.net?subject=Form" id="form"> this is not a prefered method though in my opinion. a PHP coded form is more advanced and flexible Edited February 11, 201016 yr by Sam G added [code] tags
November 25, 200818 yr Author are you wanting to email the whole form that is submitted? try this <form action="mailto:you@you.net?subject=Form" id="form"> this is not a prefered method though in my opinion. a PHP coded form is more advanced and flexible Yap want whole form. Well i heard that is php better but dont know how to code php I'll definitivly try TNX Edited February 11, 201016 yr by Sam G added [code] tags
November 25, 200818 yr Author Yap want whole form.Well i heard that is php better but dont know how to code php I'll definitivly try TNX Well no, not working, but thabks on try So noone knows*!!??? ...ok!!cmon someone give a shot
November 25, 200818 yr Im not going to do it for you but I'll point you in the right direction Looking to PHP... You'll need to pass the posted vars with $_POST. Then you'll want to format the message with text. Then send it off with php's mail function... mail()
November 25, 200818 yr Author Im not going to do it for you but I'll point you in the right direction Looking to PHP... You'll need to pass the posted vars with $_POST. Then you'll want to format the message with text. Then send it off with php's mail function... mail() I am total beginner so if u can explain i little bit what to change and how. it would be appreciated
November 25, 200818 yr Below is a PHP coded contact form .... it should give you an idea hopefully <? if (! empty($_POST['email']) ) { $message=htmlentities($_POST['message']); $email=$_POST["email"]; $flname=htmlentities($_POST['flname']); $mail=htmlentities($_POST['mail']); $content = "You have a New Message From {$flname} ( {$mail} ) : {$message}"; $mailSent = false; $mailSent = mail( $email, "Website Contact Form", $content, "From: $mail" ); if ($mailSent) { echo "Thanks $flname - Mail sent<br /><br />"; } else { echo "Problem sending mail<br /><br />"; } } ?> <form method="post" action="<? echo $_SERVER['PHP_SELF']; ?>"> Your Name: <input name="flname" type="text" /><br /> Your Email: <input name="mail" type="text" /><br /> <input name="email" type="hidden" value="YOU@YOURDOMAIN.co.uk" /><br /> Your Message:<br /> <textarea name="message" rows="5" cols="40"> </textarea><br /> <input type="submit" /> </form>
November 25, 200818 yr Below is a PHP coded contact form .... it should give you an idea hopefully <? if (! empty($_POST['email']) ) { $message=htmlentities($_POST['message']); $email=$_POST["email"]; $flname=htmlentities($_POST['flname']); $mail=htmlentities($_POST['mail']); $content = "You have a New Message From {$flname} ( {$mail} ) : {$message}"; $mailSent = false; $mailSent = mail( $email, "Website Contact Form", $content, "From: $mail" ); if ($mailSent) { echo "Thanks $flname - Mail sent<br /><br />"; } else { echo "Problem sending mail<br /><br />"; } } ?> <form method="post" action="<? echo $_SERVER['PHP_SELF']; ?>"> Your Name: <input name="flname" type="text" /><br /> Your Email: <input name="mail" type="text" /><br /> <input name="email" type="hidden" value="YOU@YOURDOMAIN.co.uk" /><br /> Your Message:<br /> <textarea name="message" rows="5" cols="40"> </textarea><br /> <input type="submit" /> </form> That's what you want
November 25, 200818 yr Author Below is a PHP coded contact form .... it should give you an idea hopefully <? if (! empty($_POST['email']) ) { $message=htmlentities($_POST['message']); $email=$_POST["email"]; $flname=htmlentities($_POST['flname']); $mail=htmlentities($_POST['mail']); $content = "You have a New Message From {$flname} ( {$mail} ) : {$message}"; $mailSent = false; $mailSent = mail( $email, "Website Contact Form", $content, "From: $mail" ); if ($mailSent) { echo "Thanks $flname - Mail sent<br /><br />"; } else { echo "Problem sending mail<br /><br />"; } } ?> <form method="post" action="<? echo $_SERVER['PHP_SELF']; ?>"> Your Name: <input name="flname" type="text" /><br /> Your Email: <input name="mail" type="text" /><br /> <input name="email" type="hidden" value="YOU@YOURDOMAIN.co.uk" /><br /> Your Message:<br /> <textarea name="message" rows="5" cols="40"> </textarea><br /> <input type="submit" /> </form> Well what can I tell just tnk u very much
Create an account or sign in to comment