![]() |
| ||
| Re: Dreamweaver email forms Quote:
This was the best help. In a matter of a few minutes I had this email form up and running inside a table on my site. Thanks! I do have a ? though. Is it possible to somehow encrypt or 'hide' the email address that receives the form? (So it does not get crawled and spammed) Thanks again! |
| ||
| Re: Dreamweaver email forms Quote:
Regards Ashjenius |
| ||
| Re: Dreamweaver email forms So this email form works perfectly that I quoted before a few posts up. I was wondering though how to make 1-2 fields a required fill in subject line. Nothing fancy like checking to make sure it's a valid email address, but just so they have to type something in the Name box the Email box. If anyone would be willing to help out I'd be greatly appreciated. Here is the php script I'm using now but I have no idea who emails me since the email field is cgi-mailer@perfora.net. Code works now fine, but I just want to add a *required Name field and *required email address field: <html> <head> <title>Sandy Sanders Designs</title> <meta name="keywords" content="Sandy Sanders,Sandy,graphic design,photography,osx,OSX,macintosh,mac,Gainesville,Florida,Maintosh,Mac"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <link href="file://tabletext.css" rel="stylesheet" type="text/css"><link href="../tabletext.css" rel="stylesheet" type="text/css"> <script type="text/JavaScript"> <!-- function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } //--> </script> <style type="text/css"> <!-- .style2 {font-size: 10px} #Layer1 { position:absolute; left:69px; top:241px; width:111px; height:275px; z-index:1; } body { background-image: url(../images/background.jpg); background-repeat: no-repeat; } .style3 { font-family: Arial, Helvetica, sans-serif; font-size: 10px; } .style4 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } .style5 {font-family: Verdana, Arial, Helvetica, sans-serif} --> </style> <script type="text/javascript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="preloadImages();MM_preloadImages('../images/homeover.gif','../images/photoover.gif','../images/logosover.gif','../images/webdesignover.gif','../images/linksover.gif','../images/filesover.gif')"> <p> <!-- ImageReady Slices (navbar.psd) --> </p> <p> </p> <table width="800" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center" valign="top"><img src="../images/expandboxtop.gif" width="800" height="13"></td> </tr> <tr> <td><table width="800" height="637" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="800" height="141" align="center" valign="top" bgcolor="#FFFFFF"><br> <a href="../index.html"><img src="../images/sslogonew.gif" width="387" height="123" border="0"></a></td> </tr> <tr> <td height="20" colspan="2" align="center" valign="top" bgcolor="#FFFFFF"><a href="../index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','../images/homeover.gif',1)"></a><a href="photography.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image8','','../images/photoover.gif',1)"></a><a href="logos.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image9','','../images/logosover.gif',1)"></a><a href="webdesign.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image10','','../images/webdesignover.gif',1)"></a><a href="links.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image11','','../images/linksover.gif',1)"></a><a href="http://sandysandersdesigns.com/files/temp" target="_blank" onMouseOver="MM_swapImage('Image12','','../images/filesover.gif',1)" onMouseOut="MM_swapImgRestore()"></a><a href="../index.html"><img src="../images/newnavbar/nav1.jpg" width="102" height="61" border="0"></a><a href="photography.html"><img src="../images/newnavbar/nav2.jpg" width="99" height="61" border="0"></a><a href="pages/logos.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image10','','images/NavBar/3over.jpg',1)"></a><a href="logos.html"><img src="../images/newnavbar/nav3.jpg" width="89" height="61" border="0"></a><a href="webdesign.html"><img src="../images/newnavbar/nav4.jpg" width="53" height="61" border="0"></a><a href="links.html"><img src="../images/newnavbar/nav5.jpg" width="53" height="61" border="0"></a><a href="http://sandysandersdesigns.com/files/temp" target="_blank"><img src="../images/newnavbar/nav6.jpg" width="51" height="61" border="0"></a><a href="contact2.php"><img src="../images/newnavbar/nav7.jpg" width="114" height="61" border="0"></a><a href="contact.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image15','','../images/contactover.gif',1)"></a></td> </tr> <tr> <td height="312" align="left" valign="top" bgcolor="#FFFFFF"><table width="131" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td width="70" height="49"> </td> <td width="61"> </td> </tr> <tr> <td height="58" align="center" valign="top"><a href="../fliesold.html"></a></td> <td align="center" valign="top"><a href="orangelake1.html"></a></td> </tr> <tr> <td height="19" align="center" valign="top" class="style2"><img src="../images/spacerbotmarg.gif" width="10" height="16"></td> <td align="center" valign="top"> </td> </tr> <tr> <td height="58" align="center" valign="top"><a href="../fliesold.html"></a></td> <td align="center" valign="top"><a href="orangelakeold.html"></a></td> </tr> <tr> <td height="19" align="center" valign="top"><img src="../images/spacerbotmarg.gif" width="10" height="16"></td> <td align="center" valign="top"></td> </tr> <tr> <td height="57" align="center" valign="top"><a href="../fliesold.html"></a></td> <td align="center" valign="top"><a href="orangelakeold.html"></a></td> </tr> <tr> <td height="19" align="center" valign="top"><img src="../images/spacerbotmarg.gif" width="10" height="16"></td> <td align="center" valign="top"> </td> </tr> <tr> <td height="59" align="center" valign="top"><a href="../fliesold.html"></a></td> <td align="center" valign="top"><a href="orangelakeold.html"></a></td> </tr> <tr> <td height="19" align="center" valign="top"><img src="../images/spacerbotmarg.gif" width="10" height="16"></td> <td align="center" valign="top"> </td> </tr> <tr> <td height="59" align="center" valign="top"><a href="../fliesold.html"></a></td> <td align="center" valign="top"><a href="orangelakeold.html"></a></td> </tr> <tr> <td height="59" align="center" valign="top"> </td> <td align="center" valign="top"> </td> </tr> </table> <p> </p> <table width="275" height="35" border="0" cellpadding="1" cellspacing="0"> <tr> <td width="298" height="35" align="left" valign="top"><img src="../images/buttons/contactinfo.gif" width="275" height="46"><br> <a href="http://www.aboutus.org/SandysAndersDesigns.com" target="_blank" class="style4">about us.org</a> <br> <br> <?php if ($_SERVER['REQUEST_METHOD'] != 'POST'){ $me = $_SERVER['PHP_SELF']; ?> <form name="form1" method="post" action="<?php echo $me;?>"> <table border="0" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td><span class="style5">Name:</span></td> <td><input type="text" name="Name"></td> </tr> <tr> <td class="style5">Subject:</td> <td><input type="text" name="Subject"></td> </tr> <tr> <td valign="top"><span class="style5">Message:</span></td> <td><textarea name="MsgBody" cols="45" rows="17"></textarea></td> </tr> <tr> <td> </td> <td><input type="submit" name="Submit" value="Send"></td> </tr> </table> </form> <?php } else { error_reporting(0); $recipient = 'fake@fakeemail.com'; $subject = stripslashes($_POST['Subject']); $from = stripslashes($_POST['Name']); $msg = "Message from: $from\n\n".stripslashes($_POST['MsgBody']); if (mail($recipient, $subject, $msg)) echo nl2br("<b>Message Sent:</b> To: $recipient Subject: $subject Message: $msg"); else echo "Message failed to send"; } ?> </td> </tr> </table> <p class="style4"> </p></td> </tr> </table></td> </tr> <tr> <td align="center" valign="top"><img src="../images/expandboxfly7bott.gif" width="800" height="13"></td> </tr> </table> <div align="center"> <span class="style3">Copyright © 2006 Sandy Sanders</span> </div> <p align="center"><script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-754277-2"; urchinTracker(); </script> </p> </body> </html> ****The only thing I changed or posting this code on the web was my email address. $recipient = 'fake@fakeemail.com'; hehehe Again any help would be greatly appreciated! p.s. I really hope I'm not spamming, but maybe in hopes that if I get a answer so will others :) Cheers, |
| ||
| Re: Dreamweaver email forms Great stuff, thanks! - Vince <URL SNIPPED> |
| All times are GMT -4. The time now is 3:04 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC