Nacota Posted September 29, 2009 Share Posted September 29, 2009 I have already gone through the search to see if I could find my problem I found one that is close but didn't discuss my issue to view my live sample please visit~~ http://www.nacota.comlu.com/html/mailforms/signup.php but what is going on is, it dosen't seem to be reading the JS validation at the top of the page, my submit / onsubmit info looks to be right, the JS looks right and just goes directly to a error page for the webservice provider If you can help but need more info please let me know! Quote Link to comment https://forums.phpfreaks.com/topic/175941-im-needing-help-with-a-phpjavascript-mail-service/ Share on other sites More sharing options...
Bricktop Posted September 29, 2009 Share Posted September 29, 2009 Hi Nacota, I'm getting an error when loading your page: Expected ')' signup.php Code: 0 Line: 19 Char: 30 URI: http://www.nacota.comlu.com/html/mailforms/signup.php Hope this helps. Quote Link to comment https://forums.phpfreaks.com/topic/175941-im-needing-help-with-a-phpjavascript-mail-service/#findComment-927086 Share on other sites More sharing options...
Nacota Posted September 29, 2009 Author Share Posted September 29, 2009 ok well here is signup.php <? include('SignUp/questconfig.inc'); if ($_SERVER['REQUEST_METHOD'] == "POST") { $ContactName = $_POST[ContactName]; $CompanyName = $_POST[CompanyName]; $YourPosition = $_POST[YourPosition]; $ContactEmail = $_POST[ContactEmail]; $Service = $_POST[service]; $WebAddress = $_POST[WebAddress]; $ExistingSite = $_POST[ExistingSite]; $Maintainyoursite = $_POST[Maintainyoursite]; $Content = $_POST[Content]; $Images = $_POST[images]; $Logo = $_POST[Logo]; $WebsiteSize = $_POST[WebsiteSize]; $Competitor1Name = $_POST[Competitor1Name]; $Competitor1URL = $_POST[Competitor1URL]; $Competitor2Name = $_POST[Competitor2Name]; $Competitor2URL = $_POST[Competitor2URL]; $Competitor3Name = $_POST[Competitor3Name]; $Competitor3URL = $_POST[Competitor3URL]; $MainFunctions = $_POST[MainFunctions]; $References1 = $_POST[References1]; $References2 = $_POST[References2]; $References3 = $_POST[References3]; $BetterFeel = $_POST[betterFeel]; // $msg2 is set in config.inc which formats the body of the message mail("$adminemail[$who]", "$subjectheader $subject", "$msg2", "From: $email \nReply-To: $email"); if ($redirecturl != "") { header("Location: $redirecturl"); } else { echo "<br><center>$finishedtext</center><br>"; } } else { include($script_dir . '/header.php'); include($script_dir . '/questionare.php'); include($script_dir . '/footer.php'); } ?> here is the header, questionare, and footer <HTML> <HEAD> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title><? echo $scriptname; ?></title> <META name="description" content=""> <META name="keywords" content=""> <META name="revisit-after" content="7days"> <META name="robots" content="index, follow"> <link href="../../../NacStyles/Nacota.css" rel="stylesheet" type="text/css"> <SCRIPT LANGUAGE="JavaScript"> <!-- Hide code from non-js browsers function validate() { formObj = document.CustomerForm; if ((formObj.Contact Name.value == "") || (formObj.Company Name.value == "") || (formObj.Your Position.value == "") || (formObj.Contact Email.value == "")) { alert("You have not filled in all required fields."); return false; } else { alert('<? echo $finishedtext; ?>'); return true; } } function formReset() {document.getElementById("CustomerForm").reset()} // end hiding --> </SCRIPT> </HEAD> <body><center> <!-- Head --> <div id="head"></div> <!-- end Head --> //--------------------------------------------------- <!-- Main --> <div id="main"> <form name="CustomerForm" method="post" id="CustomerForm" action="<? echo $script_url; ?>/signup.php" onsubmit="return validate()" > <table border="0" cellpadding="2" width="100%" class="main"> <tr> <td colspan="2" align="center" class="mainbold">Please fill out this questionaire as fully as possible, this will help us in creating your custom website!</td> </tr><!--headline--> <tr> <td align="right">Your name:</td> <td align="center"><input type="text" tabindex="1" size="20" name="ContactName" /></td> </tr><!--contact name--> <tr> <td align="right">The company name you represent:</td> <td align="center"><input type="text" tabindex="2" size="20" name="CompanyName" /></td> </tr><!--company name--> <tr> <td align="right">Your position in the company (Owner, CEO, etc.):</td> <td align="center"><input type="text" tabindex="3" size="20" name="YourPosition" /></td> </tr><!--position in company--> <tr> <td align="right">Your e-mail address:</td> <td align="center"><input type="text" tabindex="4" size="20" name="ContactEmail" /></td> </tr><!--contact e-mail--> <tr> <td align="right">Have you already purchased your domain name and hosting service?</td> <td align="center"><label for="domain">Domain:</label><input type="radio" tabindex="5" id="domain" name="Service" value="domain" /><br><label for="hosting">Hosting:</label><input type="radio" tabindex="6" id="hosting" name="Service" value="hosting" /><br><label for="both">Both:</label><input type="radio" tabindex="7" id="domainhosting" name="Service" value="both" /></td> </tr><!--Service--> <tr> <td align="right">What is the web site name(www.your-name.com)?</td> <td align="center"><input type="text" tabindex="8" id="webaddress" size="20" name="WebAddress" /></td> </tr><!--site address--> <tr> <td align="right">Do you currantly have an existing website?</td> <td align="center"><label for="existingsiteYes">Yes:</label><input type="radio" tabindex="9" id="existingsiteYes" name="ExistingSite" value="Yes" /><label for="existingsiteNo">No:</label><input type="radio" tabindex="10" id="existingsiteNo" name="ExistingSite" value="No" /></td> </tr><!--existing website--> <tr> <td align="right">Will you be using our services for maintenance, updates and upgrades?</td> <td align="center"><label for="maintainYes">Yes:</label><input type="radio" tabindex="11" id="maintainYes" name="Maintainyoursite" value="Yes" /><label for="maintainNo">No:</label><input type="radio" tabindex="12" id="maintainNo" name="Maintainyoursite" value="No" /></td> </tr><!--maintain--> <tr> <td align="right">Do you have content (text) for the website?</td> <td align="center"><label for="contentYes">Yes:</label><input type="radio" tabindex="13" id="contentYes" name="Content" value="Yes" /><label for="contentNo">No:</label><input type="radio" tabindex="14" id="contentNo" name="Content" value="No" /></td> </tr><!--content--> <tr> <td align="right">Do you have the images for the website?</td> <td align="center"><label for="imagesYes">Yes:</label><input type="radio" tabindex="15" id="imagesYes" name="Images" value="Yes" /><label for="imagesNo">No:</label><input type="radio" tabindex="16" id="imagesNo" name="Images" value="No" /></td> </tr><!--images--> <tr> <td align="right">Do you have an image of your logo for the website?</td> <td align="center"><label for="logoYes">Yes:</label><input type="radio" tabindex="15" id="logoYes" name="Logo" value="Yes" /><label for="logoNo">No:</label><input type="radio" tabindex="16" id="logoNo" name="Logo" value="No" /></td> </tr><!--logo--> <tr> <td align="right">How many pages do you expect the site to have? (rough idea)</td> <td align="center"><input type="text" tabindex="17" id="size" size="20" name="WebsiteSize" /></td> </tr><!--size--> <tr> <td align="right">Who are your company's closest competitors?</td> <td align="right"><label for="competitor1name">Company #1<br>Name:</label><input type="text" tabindex="18" size="20" id="competitor1name" name="Competitor1Name" /><br><label for="competitor1url">URL:</label><input type="text" tabindex="19" size="20" id="competitor1url" name="Competitor1URL" /><br> <label for="competitor2name">Company #2<br>Name:</label><input type="text" tabindex="20" size="20" id="competitor2name" name="Competitor2Name" /><br><label for="competitor2url">URL:</label><input type="text" tabindex="21" size="20" id="competitor2url" name="Competitor2URL" /><br> <label for="competitor3name">Company #3<br>Name:</label><input type="text" tabindex="22" size="20" id="competitor3name" name="Competitor3Name" /><br><label for="competitor3url">URL:</label><input type="text" tabindex="23" size="20" id="competitor3url" name="Competitor3URL" /></td> </tr><!--competitors--> <tr> <td align="right">What would you like your website to do for you?</td> <td><textarea id="functions" rows="4" cols="30" tabindex="24" name="MainFunctions"></textarea></td> </tr><!--functions--> <tr> <td align="right">Are there any websites you'd like us to view for style references?</td> <td align="right"><label for="reference1">URL #1:</label><input type="text" id="reference1" tabindex="25" name="References1" size="20" /><br> <label for="reference2">URL #2:</label><input type="text" id="reference2" tabindex="26" name="References2" size="20" /><br> <label for="reference3">URL #3:</label><input type="text" id="reference3" tabindex="27" name="References3" size="20" /></td> </tr><!--references--> <tr> <td align="right">Is there anything else you'd like to include that might help give us a better 'feel' for your web project, or have any comments that don't fit above?</td> <td><textarea id="betterfeel" rows="4" cols="30" tabindex="28" name="BetterFeel"></textarea></td> </tr><!--better Idea--> <tr> <td align="right"></td> <td></td> </tr><!--blank--> <tr> <td></td> <td align="right"><input class="button" type="reset" value="Clear" /><input class="button" type="submit" value="Submit" /></td> </tr><!--submit buttons--> </table> </form> </div> <!-- end Main --> //--------------------------------------------------- <BR><BR><!--{placeholder for footer html here}--></center> <BR> <BR> </BODY> </HTML> //--------------------------------------- along with the config.inc ~~ <? # script name $scriptname = "CustomerForm"; # use full paths # not using full paths could prevent the script from functioning properly # script directory # no trailing slash $script_dir = "/home/a8420943/public_html/html/mailforms/SignUp"; # script url (url to script directory above) # no trailing slash $script_url = "http://www.nacota.comlu.com/html/mailforms/SignUp"; # variables below corresponds to the Email to * in your contact form # match the numbers to the value for which option maps to a specific email # you can add more as long as you keep them in sync $adminemail = "[email protected]"; # preceeds the subject the user puts in on the contact form $subjectheader = "[Customer Form]:"; # url the form will redirect to after sending email $redirecturl = "http://www.nacota.comlu.com/html/thankyou.html"; # text that will display if you leave above variable blank $finishedtext = "Thank you for your interest, We will be contacting you soon!"; # how the message will show in the email # you can reorder these how you wish or modify the message itself to your liking # just be sure and leave the $variables in tact $msg2 = " Name: $ContactName Company: $CompanyName Position: $YourPosition Email: $ContactEmail Service: $Service Web Site Address: $WebAddress Existing Site: $ExistingSite Maintain your site: $Maintainyoursite Content Provided: $Content Images Provided: $Images Logo Provided: $Logo Progeted Website Size: $WebsiteSize Competitor1Name: $Competitor1Name Competitor1URL: $Competitor1URL Competitor2Name: $Competitor2Name Competitor2URL: $Competitor2URL Competitor3Name: $Competitor3Name Competitor3URL: $Competitor3URL Main Functions for site: $MainFunctions References1: $References1 References2: $References2 References3: $References3 Get a better feel: $BetterFeel "; ?> Now not everything do I need validated just the first few (the ones that are listed) can you tell from this what could be messing it up? also I should note that this was from this person (and didnt work at all when I got it) ######################################################### # ContactForm # ######################################################### # # # Created by: Doni Ronquillo # # Modified by: CodeMunkyX # # # # This script and all included functions, images, # # and documentation are copyright 2003 # # free-php.net (http://free-php.net) unless # # otherwise stated in the module. # # # # Any copying, distribution, modification with # # intent to distribute as new code will result # # in immediate loss of your rights to use this # # program as well as possible legal action. # # # ######################################################### Quote Link to comment https://forums.phpfreaks.com/topic/175941-im-needing-help-with-a-phpjavascript-mail-service/#findComment-927093 Share on other sites More sharing options...
Nacota Posted September 29, 2009 Author Share Posted September 29, 2009 also please try going directly to www.nacotadesigns.com (same site) and follow the link at the bottom of the page to the Questionaire Quote Link to comment https://forums.phpfreaks.com/topic/175941-im-needing-help-with-a-phpjavascript-mail-service/#findComment-927101 Share on other sites More sharing options...
Nacota Posted September 29, 2009 Author Share Posted September 29, 2009 Well now I really feel like a dunce looking at my code here I reallized that in the JS part of my form I am not supposed to have spaces in between the variables name like >> if ((formObj.Contact Name.value == "") should be: >> if ((formObj.ContactName.value == "") it seems to be working but please if your already there send me a test submission! Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/175941-im-needing-help-with-a-phpjavascript-mail-service/#findComment-927110 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.