Hi! I have problems with email form from tutorial what can be found here Thing is that email is not sending, no errors, just Cant receive email There is code: <html> <head> <title>myweb</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- body { background-color: #DBDBDB; } #apDiv1 { position:absolute; width:296px; height:164px; z-index:1; left: 272px; top: 439px; } #apDiv2 { position:absolute; width:405px; height:306px; z-index:1; left: 45%; top: 539px; } --> </style> <script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script> <script type="text/javascript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc; } 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.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}} } 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[n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.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))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> <style type="text/css"> <!-- .style2 {color: #CCCCCC} --> </style> <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .style3 {color: #FFFF00} .style6 {color: #FF0000; font-weight: bold; } .style9 {color: #000000} --> </style> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('images/index_08.gif','images/index_12.gif','images/index_20.gif','images/index_16.gif','images/index_11.gif')"> <!-- ImageReady Slices (myweb.psd) --> <div id="apDiv2"> <div id="menu"> <div id="TabbedPanels1" class="TabbedPanels"> <ul class="TabbedPanelsTabGroup"> <li class="TabbedPanelsTab style2 style3" tabindex="0"> <div align="center">Home</div> </li> <li class="TabbedPanelsTab style3" tabindex="0">Service</li> <li class="TabbedPanelsTab style3" tabindex="0">Portfolio</li> <li class="TabbedPanelsTab style2 style3" tabindex="0">Contact</li> <li class="TabbedPanelsTab style2 style3" tabindex="0">Info</li> <li class="TabbedPanelsTab style2 style3" tabindex="0">Links</li> </ul> <div class="TabbedPanelsContentGroup"> <div class="TabbedPanelsContent">Welcome to my portfolio page! I can create for you allot cool stuff, just check out Service and Info pages. If you would like to see my previous works check out Portfolio page. If you have any questions contact me in Contact page. Check out cool links that I got in Links page. Enjoy your visit!</div> <div class="TabbedPanelsContent"><?php include ("config.php"); ?> <form action="contact.php" mehod="post"> Your Email Address:<br> <input type="text" name="useraddr" size="30"> <br> Message:<br> <textarea name="comments" cols="50" rows="7"> </textarea> <br> <br> <input type="submit" value="Send Form"> <input name="Reset" type="reset" value="Reset"> </form> <?php if (isset($comments)) { $msg = $comments; $from = "From: $useraddr"; // $msg .= "You may contact the sender at the following email address: $useraddr"; mail($to,$sub,$msg,$from); echo "Your message has been sent."; } ?></div> <div class="TabbedPanelsContent">My previous works:<img src="PORTFOLIO/Blog_2_1copy.jpg" width="1024" height="768"><img src="PORTFOLIO/BLOGS copy.jpg" width="1024" height="768"><img src="PORTFOLIO/friisbijs copy.jpg" width="600" height="500"><img src="PORTFOLIO/gitvia1_2 copy.jpg" width="400" height="200"><img src="PORTFOLIO/gitvia2 copy.jpg" width="400" height="200"><img src="PORTFOLIO/banner_1 copy.jpg" width="788" height="140"><img src="PORTFOLIO/banner_3 copy.jpg" width="900" height="120"><img src="PORTFOLIO/cm copy.jpg" width="400" height="100"><img src="PORTFOLIO/edgeevents copy.jpg" width="500" height="500"><img src="PORTFOLIO/lightingpop copy.jpg" width="600" height="500"><img src="PORTFOLIO/lobortis copy.jpg" width="500" height="500"><img src="PORTFOLIO/loghtingpop2 copy.jpg" width="600" height="500"><img src="PORTFOLIO/Logo4 copy.jpg" width="400" height="145"><img src="PORTFOLIO/logo_1 copy.jpg" width="254" height="93"><img src="PORTFOLIO/Logo_10 copy.jpg" width="400" height="120"><img src="PORTFOLIO/logo_2 copy.jpg" width="400" height="100"><img src="PORTFOLIO/Logo_3 copy.jpg" width="500" height="120"><img src="PORTFOLIO/logo_4 copy.jpg" width="400" height="145"><img src="PORTFOLIO/Logo_4_2 copy.jpg" width="400" height="145"><img src="PORTFOLIO/Logo_5_2_1 copy.png" width="469" height="60"><img src="PORTFOLIO/logo_6 copy.jpg" width="400" height="120"><img src="PORTFOLIO/logo_7 copy.jpg" width="420" height="80"><img src="PORTFOLIO/Logo_8 copy.jpg" width="500" height="400"><img src="PORTFOLIO/medicine copy.jpg" width="680" height="142"><img src="PORTFOLIO/Nice copy.jpg" width="1024" height="1117"><img src="PORTFOLIO/onlinegames.gif" width="500" height="500"><img src="PORTFOLIO/Red_finnal.jpg" width="700" height="1000"><img src="PORTFOLIO/tm copy.jpg" width="500" height="500"><img src="PORTFOLIO/Untitled-1 copy.jpg" width="680" height="142"><img src="PORTFOLIO/urban copy.jpg" width="1024" height="1178"><img src="PORTFOLIO/e-book.jpg" width="500" height="500"><img src="PORTFOLIO/t-shirt_1.png" width="500" height="500"><img src="PORTFOLIO/besthost copy.jpg" width="1024" height="768"></div> <div class="TabbedPanelsContent"> <p>Contact information:</p> <ul> <li>e-mail: <span class="style6">es.edgars@inbox.lv</span></li> <li>Skype:<span class="style6"> x_matafix_x</span></li> <li>Digital point forums: <span class="style6">matafixer</span></li> </ul> <p> <label class="style6"></label> <span class="style9">Feel free to contact me!</span></p> <h2><a href="mailto:es.edgars@inbox.lv" class="style6">e-mail me!</a></h2> </div> <div class="TabbedPanelsContent"> <p>What I can do for you:</p> <ul> <li>Create logos (starting off 5$)</li> <li>Create banners (starting off 15$)</li> <li>Create web layouts (starting off 25$)</li> <li>Create avatars (starting off 3$)</li> <li>Create e-covers (starting off 15$)</li> <li>Build Web sites (starting off 70$)</li> <li>Other</li> </ul> <p>File formats: .psd; .jpg; .png; .gif; .swf(flash); and others as well. If you want to order something- go to Service page. For more information or questions Contact me!.</p> <p> </p> </div> <div class="TabbedPanelsContent">Content 5</div> </div> </div> </div> </div> <table width="801" height="601" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01"> <tr> <td rowspan="9"> <img src="images/index_01.gif" width="21" height="600" alt=""></td> <td colspan="9"> <img src="images/index_02.gif" width="755" height="1" alt=""></td> <td rowspan="9"> <img src="images/index_03.gif" width="23" height="600" alt=""></td> <td> <img src="images/index_04.gif" width="1" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="1" alt=""></td> </tr> <tr> <td colspan="9"> <img src="images/index_05.gif" width="755" height="163" alt=""></td> <td rowspan="8"> <img src="images/index_06.gif" width="1" height="599" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="163" alt=""></td> </tr> <tr> <td colspan="3"> <img src="images/index_07.gif" width="350" height="73" alt=""></td> <td colspan="3" rowspan="3"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image44','','images/index_08.gif',1)"><img src="images/myweb_08.gif" name="Image44" width="81" height="84" border="0"></a></td> <td colspan="3" rowspan="2"> <img src="images/index_09.gif" width="324" height="76" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="73" alt=""></td> </tr> <tr> <td rowspan="6"> <img src="images/index_10.gif" width="268" height="363" alt=""></td> <td colspan="2" rowspan="3"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image48','','images/index_11.gif',1)"><img src="images/myweb_11.gif" name="Image48" width="82" height="70" border="0"></a></td> <td> <img src="images/spacer.gif" width="1" height="3" alt=""></td> </tr> <tr> <td colspan="2" rowspan="3"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image45','','images/index_12.gif',1)"><img src="images/myweb_12.gif" name="Image45" width="77" height="72" border="0"></a></td> <td rowspan="5"> <img src="images/index_13.gif" width="247" height="360" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="8" alt=""></td> </tr> <tr> <td colspan="3"> <img src="images/index_14.gif" width="81" height="59" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="59" alt=""></td> </tr> <tr> <td> <img src="images/index_15.gif" width="35" height="5" alt=""></td> <td colspan="2" rowspan="2"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image47','','images/index_16.gif',1)"><img src="images/myweb_16.gif" name="Image47" width="87" height="89" border="0"></a></td> <td colspan="2"> <img src="images/index_17.gif" width="41" height="5" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="5" alt=""></td> </tr> <tr> <td rowspan="2"> <img src="images/index_18.gif" width="35" height="288" alt=""></td> <td rowspan="2"> <img src="images/index_19.gif" width="1" height="288" alt=""></td> <td colspan="2"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image46','','images/index_20.gif',1)"><img src="images/myweb_20.gif" name="Image46" width="86" height="84" border="0"></a></td> <td rowspan="2"> <img src="images/index_21.gif" width="31" height="288" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="84" alt=""></td> </tr> <tr> <td colspan="2"> <img src="images/index_22.gif" width="87" height="204" alt=""></td> <td colspan="2"> <img src="images/index_23.gif" width="86" height="204" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="204" alt=""></td> </tr> <tr> <td> <img src="images/spacer.gif" width="21" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="268" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="35" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="47" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="40" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="40" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="46" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="31" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="247" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="23" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="1" alt=""></td> <td></td> </tr> </table> <!-- End ImageReady Slices --> <script type="text/javascript"> <!-- var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1"); //--> </script> </body> </html> And there is how it looks: Please help
Thats hellofa long code.... Where is $to and other variables in mail() defined ? Also try not to send the mail to the same server ... send it to your yahoo or hotmail or other such emails .....
Does "Your message has been sent" gets displayed at all? Try replacing if (isset($comments)) { Code (markup): with if (isset($_POST['comments'])) { Code (markup):
Yes, its not displaying at all, you can check it by your self in http://62.85.116.228/mypage And that code is for all website will try your suggested things...
Man- I really dont understand what you are talking about I used just tutorial and I dont understand PHP, but thanks for your try to help me
Well , if you dont understand PHP , try to get a simple tutorial to work with .... This is too crappy a code....
He means before calling mail($to,$sub,$msg,$from); you need to define $to and $sub variables. For Example ... $to = "youemailaddress@mail.com"; $sub = "Submitted Form"; mail($to,$sub,$msg,$from); ... Code (markup):
BTW , is that your Computer IP ? I would suggest not giving it away like this if it is in fact your ip ....... I would suggest you again : Get a simple script somewhere .... Did not visit these threads , thought you may be intrested ....Got it from down there "Simillar Threads"