PDA

View Full Version : ok form not working....was before


cradl
07-01-2010, 01:38 AM
rebuilt site and now form is not working.....don't know where to start...any help...

edbr
07-01-2010, 02:42 AM
code , link or crystal ball

cradl
07-01-2010, 02:49 AM
sorry what code do you need here is it from contact page...

<!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"><!-- InstanceBegin template="/Templates/mainpage.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta name="Keywords" content="asphalt plant painting, hma plant painting, concrete plant painting, asphalt plants, commercial painting, silo painting, conveyor painting, tank painting, industrial painting, tank sandblasting, quarry painting, industrial painting, Polyurea coatings, Polyurea linings, interior tank painting, baghouse painting, drag chain painting, cold feed bin painting, remote location sandblasting, blast, paint, blasting, painting, soda blasting, soda blast, wisconsin, custom painting, media blasting, sand blasting, equipment blasting, coal slag, soda blaster, high pressure steam cleaning, epoxy coatings, cooling tower painting, sand gravel plant painting, sand plant painting, bulk storage painting, aggregate plant painting, fertilizer storage tank painting, tank farm painting, polyurea coating, garnet abrasive, steel shot, magnesium sulfate, dry ice, sponge, high temperature heat paint, fire retardant paint, energy insulating paint, wisconsin commercial painting, wisconsin asphalt plant painting, national asphalt plant painting" />
<meta name="Description" content="Kuehl Coatings - Asphalt Plant Painting" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<!-- InstanceBeginEditable name="doctitle" -->
<title>Kuehl Coatings - Contact Us</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
body {
background-image: url(images/Asphaltbg.jpg);
background-repeat: repeat;
}
-->
</style>
<link href="CSS/layout.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];}}
}

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_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
} else if (event == "down") {
nbArr = document[grpName];
if (nbArr)
for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
nbArr[nbArr.length] = img;
} }
}
//-->
</script>
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.style11 {color: #FF0000}
-->
</style>
<script type="text/javascript">
<!--
function MM_validateForm() { //v4.0
if (document.getElementById){
var i,p,q,nm,test,num,min,max,errors='',args=MM_valida teForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
} }
//-->
</script>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
a:link {
text-decoration: none;
color: #000;
}
a:visited {
text-decoration: none;
color: #000;
}
a:hover {
text-decoration: underline;
color: #000;
}
a:active {
color: #FFF;
}
#wrapper #tagline {
text-align: center;
}
-->
</style></head>

<body onload="MM_preloadImages('images/Navbar/home2.png','images/Navbar/hma2.png','images/Navbar/projects2.png','images/Navbar/media2.png','images/Navbar/contact2.png','images/Navbar/environmental2.png')">
<div id="wrapper">
<div id="logo"><img src="images/900 Header.png" width="900" height="400" alt="logo" /></div>
<div id="navbar">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href="index.html" target="_top" onclick="MM_nbGroup('down','group1','home','',1)" onmouseover="MM_nbGroup('over','home','images/Navbar/home2.png','',1)" onmouseout="MM_nbGroup('out')"><img src="images/Navbar/home.png" alt="" name="home" width="145" height="30" border="0" id="home" onload="" /></a></td>
<td><a href="hma_plant_painting.html" target="_top" onclick="MM_nbGroup('down','group1','hma','',1)" onmouseover="MM_nbGroup('over','hma','images/Navbar/hma2.png','',1)" onmouseout="MM_nbGroup('out')"><img src="images/Navbar/hma.png" alt="" name="hma" width="150" height="30" border="0" id="hma" onload="" /></a></td>
<td><a href="images/jalbum/Kuehl Coatings/Kuehl Coatings/album/index.html" target="_top" onclick="MM_nbGroup('down','group1','projects','',1)" onmouseover="MM_nbGroup('over','projects','images/Navbar/projects2.png','',1)" onmouseout="MM_nbGroup('out')"><img src="images/Navbar/projects.png" alt="" name="projects" width="145" height="30" border="0" id="projects" onload="" /></a></td>
<td><a href="media_blast.html" target="_top" onclick="MM_nbGroup('down','group1','mediablast','',1)" onmouseover="MM_nbGroup('over','mediablast','images/Navbar/media2.png','',1)" onmouseout="MM_nbGroup('out')"><img src="images/Navbar/media.png" alt="" name="mediablast" width="140" height="30" border="0" id="mediablast" onload="" /></a></td>
<td><a href="environmental_services.html" target="_top" onclick="MM_nbGroup('down','group1','environmental','',1)" onmouseover="MM_nbGroup('over','environmental','images/Navbar/environmental2.png','',1)" onmouseout="MM_nbGroup('out')"><img src="images/Navbar/environmental.png" alt="" name="environmental" border="0" id="environmental" onload="" /></a></td>
<td><a href="contact_us.html" target="_top" onclick="MM_nbGroup('down','group1','contact','',1)" onmouseover="MM_nbGroup('over','contact','images/Navbar/contact2.png','',1)" onmouseout="MM_nbGroup('out')"><img src="images/Navbar/contact.png" alt="" name="contact" width="140" height="30" border="0" id="contact" onload="" /></a></td>
</tr>
</table>
</div>
<!-- InstanceBeginEditable name="centercontent" -->
<div id="centeredcontent"></div>
<!-- InstanceEndEditable --><!-- InstanceBeginEditable name="centercontent2" -->
<div id="centercontent2">Please fill form out below.</div>
<!-- InstanceEndEditable --><!-- InstanceBeginEditable name="leftside" -->
<div id="leftside">
<p><img src="images/Pic1.jpg" width="250" height="167" alt="pic1" /></p>
<p>Kuehl Coatings</p>
<p>Dane, WI. 53529</p>
<p>Phone: 608-318-3263</p>
<p>Fax: 608-850-9426</p>
</div>
<!-- InstanceEndEditable --><!-- InstanceBeginEditable name="rightside" -->
<div id="rightside">
<table width="100%" border="0" cellpadding="5">
<tr>
<td><div align="right">
<label for="companyname">Company Name:</label>
</div></td>
<td><div align="left">
<input name="companyname" type="text" id="companyname" onblur="MM_validateForm('email','','RisEmail','zipcode','' ,'RisNum');return document.MM_returnValue" size="35" maxlength="50" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="name">Name:</label>
</div></td>
<td><div align="left">
<input name="name" type="text" id="name" size="35" maxlength="35" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="email">Email:</label>
</div></td>
<td><div align="left">
<input name="email" type="text" id="email" size="35" maxlength="50" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="address">Address:</label>
</div></td>
<td><div align="left">
<input name="address" type="text" id="address" size="35" maxlength="50" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="city">City:</label>
</div></td>
<td><div align="left">
<input name="city" type="text" id="city" size="35" maxlength="35" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="state">State:</label>
</div></td>
<td><div align="left">
<input name="state" type="text" id="state" size="35" maxlength="2" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="zipcode">Zip Code:</label>
</div></td>
<td><div align="left">
<input name="zipcode" type="text" id="zipcode" size="35" maxlength="5" />
</div></td>
</tr>
<tr>
<td><div align="right"> Anticipated Start Date:</div></td>
<td><div align="left">
<input name="anticipatedstartdate" type="text" id="anticipatedstarttime" size="35" maxlength="35" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label>Comments:</label>
</div></td>
<td><div align="left">
<textarea name="comments" id="comments" cols="26" rows="5" wrap="physical"></textarea>
</div></td>
</tr>
<tr>
<td><label for="clear"></label></td>
<td><label for="submit"></label>
<input name="submit" type="submit" id="submit" onclick="MM_validateForm('name','','R','email','','NisEmail ','city','','R','state','','R','zipcode','','R');r eturn document.MM_returnValue" value="Send Email" />
<input type="reset" name="clear" id="clear" value="Reset Form" /></td>
</tr>
<tr>
<td><div align="right">Send Us Your Pictures:</div></td>
<td><a href="mailto:kuehlcoatings@gmail.com" class="style11"><u>Click here to send Us your pictures</u></a></td>
</tr>
<tr>
<td><div align="right">Contact Web Admin.:</div></td>
<td><a href="mailto:cradl69@gmail.com" class="style11"><u>Contact</u></a></td>
</tr>
</table>
</div>
<!-- InstanceEndEditable -->
<div id="companylogos">
<div align="center"><img src="images/All Companies Logos.png" alt="company_logos" width="800" height="130" border="0" usemap="#Map" />
<map name="Map" id="Map">
<area shape="rect" coords="25,11,109,112" href="http://www.highland-international.com/" alt="highland_link" />
</map>
</div>
</div>
<div id="tagline"><img src="images/tagline.jpg" alt="" name="tagline" width="875" height="40" id="tagline2" /></div>
<div id="3pics">
<div align="center"><img src="images/threepics.jpg" width="808" height="200" alt="pics" /></div>
</div>
<div id="navbottom">
<table width="100%">
<tr>
<td><img src="images/Symbol.png" width="20" height="20" alt="symbol" /></td>
<td><a href="index.html">Home</a></td>
<td><img src="images/Symbol.png" width="20" height="20" alt="symbol" /></td>
<td><a href="hma_plant_services.html">HMA Plant Painting</a></td>
<td><img src="images/Symbol.png" width="20" height="20" alt="symbol" /></td>
<td><a href="Coatings/album/index.html">Projects</a></td>
<td><img src="images/Symbol.png" width="20" height="20" alt="symbol" /></td>
<td><a href="media_blasting.html">Media Blastsing</a></td>
<td><img src="images/Symbol.png" width="20" height="20" alt="symbol" /></td>
<td><a href="environmental_services.html"><font color="#1cda03">Environmental Services</font></a></td>
<td><img src="images/Symbol.png" width="20" height="20" alt="symbol" /></td>
<td><a href="contact_us.html">Contact Us</a></td>
</tr>
</table>
</div>
<div id="footer"></div>
</div>
</body>
<!-- InstanceEnd --></html>

edbr
07-01-2010, 03:43 AM
you ar missint the form tags, unless ive gone code blind. ex

<form action="mypage.php" method="post" name="contact">
///// here goes all your form fields

</form>

cradl
07-01-2010, 03:53 AM
I have a contact_us.asp, contact_us.html, contactformproces.html and form to email.php all uploaded. All I did was place it in a template and copy everthing over and still uploaded everything to site. But I'm assuming it is code....where do I put it....? Thanks it has been a year since I did the form forgot what all needs to go into it...

edbr
07-01-2010, 04:07 AM
this should do it but check the action path to the email.php

<form action="email.php" method="post" name="contact">

<div align="right">
<label for="companyname">Company Name:</label>
</div></td>
<td><div align="left">
<input name="companyname" type="text" id="companyname" onblur="MM_validateForm('email','','RisEmail','zip code','','RisNum');return document.MM_returnValue" size="35" maxlength="50" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="name">Name:</label>
</div></td>
<td><div align="left">
<input name="name" type="text" id="name" size="35" maxlength="35" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="email">Email:</label>
</div></td>
<td><div align="left">
<input name="email" type="text" id="email" size="35" maxlength="50" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="address">Address:</label>
</div></td>
<td><div align="left">
<input name="address" type="text" id="address" size="35" maxlength="50" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="city">City:</label>
</div></td>
<td><div align="left">
<input name="city" type="text" id="city" size="35" maxlength="35" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="state">State:</label>
</div></td>
<td><div align="left">
<input name="state" type="text" id="state" size="35" maxlength="2" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="zipcode">Zip Code:</label>
</div></td>
<td><div align="left">
<input name="zipcode" type="text" id="zipcode" size="35" maxlength="5" />
</div></td>
</tr>
<tr>
<td><div align="right"> Anticipated Start Date:</div></td>
<td><div align="left">
<input name="anticipatedstartdate" type="text" id="anticipatedstarttime" size="35" maxlength="35" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label>Comments:</label>
</div></td>
<td><div align="left">
<textarea name="comments" id="comments" cols="26" rows="5" wrap="physical"></textarea>
</div></td>
</tr>
<tr>
<td><label for="clear"></label></td>
<td><label for="submit"></label>
<input name="submit" type="submit" id="submit" onclick="MM_validateForm('name','','R','email','', 'NisEmail','city','','R','state','','R','zipcode', '','R');return document.MM_returnValue" value="Send Email" />
<input type="reset" name="clear" id="clear" value="Reset Form" /></td>

</form>

cradl
07-02-2010, 03:05 PM
Ok so I did that and the form worked and kicked me back to homepage after a few seconds like it was suppose to but I didn't get an email. I changed the email.php to contactformprocess.php Also I have formtoemail.php I will post it after the next reply if needed. It has been a while since I set this all up for the first time so I'm kinda lost. Everything worked before.

<?php
/* Subject and Email Variables */

$emailSubject = 'Painting "Requested"';
$webMaster = 'kuehlcoatings@gmail.com';

/* Gathering Data Variables */

$companyname = $_POST['companyname'];
$name = $_POST['name'];
$email = $_POST['email'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$zipcode = $_POST['zipcode'];
$anticipatedstartdate = $_POST['anticipatedstartdate'];
$comments = $_POST['comments'];

$body = <<<EOD
<br><hr><br>
Companyname: $companyname <br>
Name: $name <br>
Email: $email <br>
Address: $address <br>
City: $city <br>
State: $state <br>
Zip Code: $zipcode <br>
Anticipated Start Date: $anticipatedstartdate <br>
Comments: $comments <br>
EOD;

$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster,$emailSubject,$body,$headers);

/* Results rendered as HTML */

$theResults = <<<EOD
<html>
<head>
<title>Email Sent</title>
<meta http-equiv="refresh" content="3;URL=http://www.kuehlcoatings.com/index.html">
<style type="text/css">
<!--
body {
background-color: #444;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 20px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #fec001;
text-decoration: none;
padding-top: 200px;
margin-left: 150px;
width: 800px;
}

-->
</style>
</head>
<div align="center">Your email will be answered soon as possible!
You will return to Kuehl Coatings in a few seconds !</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>

edbr
07-03-2010, 01:09 AM
not 100% sure it would stop the mailing but
$emailSubject = 'Painting "Requested"';
try $emailSubject = 'Painting Requested';

davidj
07-06-2010, 09:15 AM
this is a worry....


contact_us.asp,
email.php
notice the 2 conflicting extensions

This could be why it doesn't work