radarhunter Posted August 11, 2007 Share Posted August 11, 2007 Below is the code of : Inviting a Friend - Script please help me correct where i`m wrong Basically i`ve programmed it so that when a member wants to invite a friend he can through this script and when he click enter a readymade html is delivered to the recipient's email address. Problem : On filling up all the text field when i try to submit the form it reloads the page and the html is not sent to the person to whom it is to be sent..... And after the secript it sent i want it to be directed to a particular webpage to whatever it may be .......... I have this script on my site http://www.stepheniansonline.com/forum/invitation.php Someone please help me to correct this <form id="Form1" action="submit.php" action="POST"><div align="center"> <div class="page" style="width:100%; text-align:left"> <div style="padding:0px 20px 0px 20px"> <div class="vbmenu_popup" id="pagenav_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0"> <tr> <td class="thead" nowrap="nowrap">Go to Page...</td> </tr> <tr> <td class="vbmenu_option" title="nohilite"> <form action="forums.html" method="get" onSubmit="return this.gotopage()" id="pagenav_form"> <input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" /> <input type="button" class="button" id="pagenav_ibtn" value="Go" /> </form> </td> </tr> </table> </div> <!-- google_ad_section_start(weight=ignore) --> <!-- google_ad_section_end --> <br /> <table class="tborder" cellpadding="4" cellspacing="1" border="0" width="100%" align="center"> <thead> <tr align="center"></tr> </thead> <tbody id="collapseobj_feinvite" style=""> <tr> <td class="alt1" width="100%"> <ul> <li>SO is a cool site right So why not help spread the word.</li> <li>All invitation mails have your referrer id embedded into all links so that when a person comes to SO via a link in email, he will automatically be your referrer. And if he registers you earn 50 nickels.</li> <li>Plus we have done the tough part for you of writing the actual message. All you have to do is to enter the name and email of your friend's and hit send. Its that simple. </ul> Help spread the word! Help Spread the Fun Revolution!! </td> </tr> </tbody> </table> <br /> <form action="invitation.php" enctype="multipart/form-data" method="post" > <input type="hidden" name="do" value="sendm" /> <table class="tborder" cellpadding="4" cellspacing="1" border="0" width="100%" align="center"> <tr> <td class="thead">Send E-Mail invitation to friends.</td> </tr> <tr> <td class="panelsurround" align="center"> <div class="panel"> <table cellpadding="0" cellspacing="3" border="0" width="100%"> <tr> <td class="alt2">Enter the name you want your friends to see<br /><input type="text" class="bginput" name="myname" size="60" maxlength="250" /></td> </tr> <tr> <td class="alt1">Enter the email you want your friends to see<br /><input type="text" class="bginput" name="myemail" size="60" maxlength="250" /> <br /></td> </tr> <tr> <td class="alt2">Enter all the id's of your friend here<br /> <span class="smallfont"><a href="javascript:doCONBoxes()">Add more Contact fields</a><br /> <b>Name:</b> <input class="bginput" type="text" size="35" maxlength="250" name="fname[0]" /> <b>Email:</b> <input class="bginput" type="text" size="35" maxlength="250" name="fmail[0]" /><br /> <div id="contacts"></div> <br /></td> </tr> <tr> <td class="alt1"> You can <i>optionally</i> personalize the introduction message. Please enter the same below. <br /> <b>Do not enter any salutations. That's automatically inserted.</b> </td> </tr> <tr> <td class="alt2"> <textarea class="bginput" name="sendtext" cols="70" rows="7"></textarea><br /> </td> </tr> <tr> <td class="alt1"> Please choose the template style you want to send. You can also preview it before sending. Rest would be handled for you.<br /> <input type="radio" name="choice" value="0" checked="checked" /> <a target="_blank" href="http://www.stepheniansonline.com/emails/index.html" title="Preview General Template">General Template</a> <br /> <input type="radio" name="choice" value="1" /> <a target="_blank" href="http://www.stepheniansonline.com/emails/index1.html" title="Preview boys Template">For Him Template</a> <br /> <input type="radio" name="choice" value="2" /> <a target="_blank" href="http://www.stepheniansonline.com/emails/index2.html" title="Preview girls Template">For Her Template</a> <br /> </tr> </table> </div> <div style="margin-top:4px" align="center"> <input type="submit" class="button" name="sbutton" value="Send Mail" accesskey="s" /> </div> </td> </tr> </table> </form> <br /> <br /> <br /> <script type="text/javascript"> <!-- var tzOffset = 5.5 + 0; var utcOffset = new Date().getTimezoneOffset() / 60; if (Math.abs(tzOffset + utcOffset) == 1) { // Dst offset is 1 so its changed document.forms.dstform.submit(); } //--> </script> <script type="text/javascript"> <!-- // Main vBulletin Javascript Initialization vBulletin_init(); //--> </script> </div> </div> </div></form> Quote Link to comment https://forums.phpfreaks.com/topic/64433-invitation-form-please-help/ Share on other sites More sharing options...
LiamProductions Posted August 11, 2007 Share Posted August 11, 2007 Look at http://www.php.net/mail Quote Link to comment https://forums.phpfreaks.com/topic/64433-invitation-form-please-help/#findComment-321259 Share on other sites More sharing options...
radarhunter Posted August 11, 2007 Author Share Posted August 11, 2007 i already tried to seek help via those tutorials but it didn`t help Quote Link to comment https://forums.phpfreaks.com/topic/64433-invitation-form-please-help/#findComment-321266 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.