Markovna Posted August 6, 2008 Share Posted August 6, 2008 Hello, I am new & will up-front apologize for anything I do incorrectly. Now, with that said, my company outsourced web designer/programmer build the pages for a clients site. Then I was asked to tweak the pages to the clients specifications. No problem...I know Dreamweaver and basic HTML & CSS...however, I do not know PHP at all. The problem is that the form he created does not work at all & I am a bit lost in how to fix it as he will not get back to me. The hosting service supports PHP 4. This file is saved as a PHP doc. Any help would be greatly appreciated. <?php if (array_key_exists('formSubmitted', $_POST)) { $mailsuccess = mail("client@gmail.com","Contact Form Submission","nFirstName = '" . $FirstName . "'\nLastName = '" . $LastName . "'\nEmailAddr = '" . $EmailAddr . "'\nPhoneNumber = '" . $PhoneNumber . "'\nZipCode = '" . $ZipCode . "'\nPetName = '" . $PetName . "'\nPetType = '" . $PetType . "'\nPetBreed = '" . $PetBreed . "'\nMessage = '" . $Message, "FROM: info@dermagic.net"); if($mailsuccess){ // insert html thank you page code between single quotes echo('<html><h1>Thank you!!!</h1></html>'); // or comment out the line above, and uncomment the line below to redirect to a thank you page //http_redirect("/thanks.htm"); } else { //start HTML response echo('<html>'); // insert html form submission failure message code between single quotes of the line below. echo('<h1>Sorry couldn\'t send form email</h1></html>'); // or coment out the lines above in this else block, uncomment the line below to redirect to an error message page //http_redirect("/error.htm"); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" charset=iso-8859-1 name="keywords" content="dermagic, pet dermatology, pet care, pet care products, dog care, dog care products, dog shampoo, itchy dogs, dog dermatitis, dog skin care, skin care, all-natural, skin care formulas, hot spots, cruelty free, allergies in dogs allergy symptoms signs itching sneezing itch allergen treatment medications histamine flea allergies, allergy, allergies, allergen, pet, dog, cat, scratch, itch, atopy, atopic, intradermal allergy test, immunotherapy, flea control, Atopica, atopic dermatitis, allergic skin disease, antihistamine, steroid, desensitization"> <meta name="description"content="All natural skin care for dogs instantly relieves itching & redness. Treats mange, dermatitis, hot spots and all skin conditions! GUARANTEED!Frequently asked questions about dog allergies and how we can better help treat them are answered.Allergies, which cause intense itching in pets, cannot be cured, but they can be controlled. FDA-approved treatments are available to help reduce the itch and clear up infections and other skin conditions in dogs and cats."> <title>DERMagic Skin Care for Animals, Dogs, Cats, Horses, all natural</title> <link type="text/css" rel="Stylesheet" href="navstyles.css" media="all" /> <script type="text/javascript"> fixIEhover = function() { var fxIElis = document.getElementById("nav").getElementsByTagName("LI"); for (var i=0; i<fxIElis.length; i++) { fxIElis[i].onmouseover=function() { this.className+=" fxhover"; } fxIElis[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" fxhover\\b"), ""); } } } if (window.attachEvent) window.attachEvent("onload", fixIEhover); try { document.execCommand("BackgroundImageCache", false, true); } catch(err) {} 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> <link href="style_new.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style21 { color: #353B5E } #apDiv1 { position:absolute; left:452px; top:659px; width:484px; height:38px; z-index:2; } .style23 {font-size: 12px} --> </style> </head> <body> <div id="background7"> <!-- NAVIGATION--> <div id="navdiv"> <ul id="nav"> <li id="about"> <ul> <li id="founder" onclick="window.location='aboutus_founder.htm'"></li> <li id="blog" onclick="window.location='aboutus_blog.htm'"></li> </ul> </li> <li id="dermindogs" onclick="window.location='dermatitis.htm'"></li> <li id="products"> <ul> <li id="dermagic" onclick="window.location='index.htm'"></li> <li id="more" onclick="window.location='products_more.htm'"></li> <li id="where" onclick="window.location='products_wheretobuy.htm'"></li> </ul> </li> <li id="testimon" onclick="window.location='testimonials.htm'"></li> <li id="contact" onclick="window.location='contactus.htm'"></li> <li id="signup" onclick="window.location='signup.php'"></li> <li id="home" onclick="window.location='home.htm'"></li> </ul> </div> <!-- END NAVIGATION--> <div id="textbox_signup1"> <div align="center" class="style26 style25 style18 style21"><strong>Watch for news, specials, new products, free offers.<br /> Safe unsubscribe at any time.</strong></div> </div> <div id="textbox_signup"> <table width="278" height="329" border="0" align="center" cellpadding="3" cellspacing="0" style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma"> <input type="hidden" value="FirstName;LastName;emailaddr" name="required_fields" /> <tbody> <tr> <td width="91" height="25" align="left" valign="center"><span class="style23">*First Name:</span> </td> <td width="175" align="left" valign="top"><input style="FONT-SIZE: 9pt; WIDTH: 170px; FONT-FAMILY: Tahoma" size="35" name="FirstName" /></td> </tr> <tr> <td height="25" align="left" valign="center"><span class="style23">Last Name:</span> </td> <td valign="top" align="left"><input style="FONT-SIZE: 9pt; WIDTH: 170px; FONT-FAMILY: Tahoma" size="35" name="LastName" /></td> </tr> <tr> <td height="25" align="left" valign="center"><span class="style23">*Email: </span></td> <td valign="top" align="left"><input style="FONT-SIZE: 9pt; WIDTH: 170px; FONT-FAMILY: Tahoma" size="35" name="EmailAddr" /></td> </tr> <tr> <td valign="center" align="left"> <span class="style23">Zip Code:</span> </td> <td valign="top" align="left"><input style="FONT-SIZE: 9pt; WIDTH: 170px; FONT-FAMILY: Tahoma" size="35" name="ZipCode" /></td> </tr> <tr> <td height="25" align="left" valign="center"><span class="style23">Pet's Name:</span></td> <td valign="top" align="left"><input style="FONT-SIZE: 9pt; WIDTH: 170px; FONT-FAMILY: Tahoma" size="35" name="PetName" /></td> </tr> <tr> <td height="25" align="left" valign="center"><span class="style23">Pet Type:</span><br /></td> <td valign="top" align="left"><input style="FONT-SIZE: 9pt; WIDTH: 170px; FONT-FAMILY: Tahoma" size="35" name="PetType" /></td> </tr> <tr> <td height="25" align="left" valign="center"><span class="style23">Pet Breed:</span></td> <td valign="top" align="left"><input style="FONT-SIZE: 9pt; WIDTH: 170px; FONT-FAMILY: Tahoma" size="35" name="PetBreed" /></td> </tr> <tr> <td valign="top" align="left"><span class="style23">Comments:</span></td> <td valign="top" align="left"><textarea name="Message" cols="20" rows="3" id="Message" style="FONT-SIZE: 9pt; WIDTH: 170px; FONT-FAMILY: Tahoma"></textarea></td> </tr> <tr> <td valign="top" align="left"> </td> <td valign="top" align="left"><div align="left">* indicates required field</div></td> </tr> <tr> <td height="30" align="left" valign="top"> </td> <td valign="top" align="left"> </td> </tr> <!-- #ADDFIELD# --> <TR> <TD colspan="2" align=middle vAlign=top><input type="hidden" name="formSubmitted" /> <div align="center"><BR> <INPUT class=FormLt1 style="FONT-SIZE: 9pt; CURSOR: hand; FONT-FAMILY: Tahoma" type=submit value="Submit Form" name=SUBMIT> </div></TD> </TR> </tbody> </table> </div> <!-- END NAVIGATION--> <div id="leftnav_home3"> <FORM action=https://www.paypal.com/cgi-bin/webscr method=post target=paypal><INPUT type=hidden value=_cart name=cmd> <INPUT type=hidden value=dermagic@gmail.com name=business> <INPUT type=image alt="Make payments with PayPal - it's fast, free and secure!" src="images/view_cart3.gif" border=0 name=submit6> <INPUT type=hidden value=1 name=display> </FORM></div> </div> <div id="preloader"> <img src="images/nav/nav_about_over.gif" width="1" height="1" alt="Image 01" /> <img src="images/nav/nav_contact_over.gif" width="1" height="1" alt="Image 02" /> <img src="images/nav/nav_dermindogs_over.gif" width="1" height="1" alt="Image 03" /> <img src="images/nav/nav_home_over.gif" width="1" height="1" alt="Image 04" /> <img src="images/nav/nav_products_over.gif" width="1" height="1" alt="Image 05" /> <img src="images/nav/nav_signup_over.gif" width="1" height="1" alt="Image 06" /> <img src="images/nav/nav_testimon_over.gif" width="1" height="1" alt="Image 07" /> <img src="images/nav/subnav_about_blog.gif" width="1" height="1" alt="Image 08" /> <img src="images/nav/subnav_about_blog_over.gif" width="1" height="1" alt="Image 09" /> <img src="images/nav/subnav_about_founder.gif" width="1" height="1" alt="Image 10" /> <img src="images/nav/subnav_about_founder_over.gif" width="1" height="1" alt="Image 11" /> <img src="images/nav/subnav_products_dermagic.gif" width="1" height="1" alt="Image 12" /> <img src="images/nav/subnav_products_dermagic_over.gif" width="1" height="1" alt="Image 13" /> <img src="images/nav/subnav_products_more.gif" width="1" height="1" alt="Image 14" /> <img src="images/nav/subnav_products_more_over.gif" width="1" height="1" alt="Image 15" /> <img src="images/nav/subnav_products_where.gif" width="1" height="1" alt="Image 16" /> <img src="images/nav/subnav_products_where_over.gif" width="1" height="1" alt="Image 17" /> </div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/118488-trouble-with-php-form-on-website/ Share on other sites More sharing options...
papaface Posted August 6, 2008 Share Posted August 6, 2008 Use code tags. Quote Link to comment https://forums.phpfreaks.com/topic/118488-trouble-with-php-form-on-website/#findComment-609969 Share on other sites More sharing options...
.josh Posted August 6, 2008 Share Posted August 6, 2008 Would also help if you were more specific than "It doesn't work." Quote Link to comment https://forums.phpfreaks.com/topic/118488-trouble-with-php-form-on-website/#findComment-609971 Share on other sites More sharing options...
Markovna Posted August 6, 2008 Author Share Posted August 6, 2008 No information is being generated from the form to the client email, infact, no action is being generated at all. Quote Link to comment https://forums.phpfreaks.com/topic/118488-trouble-with-php-form-on-website/#findComment-609991 Share on other sites More sharing options...
ober Posted August 15, 2008 Share Posted August 15, 2008 Bumped for more help. Quote Link to comment https://forums.phpfreaks.com/topic/118488-trouble-with-php-form-on-website/#findComment-617534 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.