Jump to content

Problem with Php form


shaun parmar

Recommended Posts

Hi people, need help with my contact form. Basically i know it works with one website i use

http://www.hestonphotographics.com/slickstudios/contact.htm

 

But i am now using it on my website

http://www.slickstudios.co.uk/contact.htm

 

and doesn't work, they are both the same form. Can some one please help

 

This is contactthanks.php script

 

<html>
<head>
<title>:: Home of Slick Studios :: FAQ</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
 if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
   document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
 else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_swapImgRestore() { //v3.0
 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&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[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
 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 && document.getElementById) x=document.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[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" onLoad="MM_preloadImages('menu%20buttons/homepage-b.jpg','menu%20buttons/about-us-b.jpg','menu%20buttons/gallery-b.jpg','menu%20buttons/pricing-b.jpg','menu%20buttons/fram-style-b.jpg','menu%20buttons/contact-b.jpg','menu%20buttons/how-to-b.jpg')">
<div id="Layer1" style="position:absolute; left:79px; top:4px; width:515px; height:453px; z-index:1"><img src="menu%20buttons/top-banner4.jpg" width="760" height="216"></div>
<div id="Layer2" style="position:absolute; left:85px; top:200px; width:153px; height:12px; z-index:2"><a href="index.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','menu%20buttons/homepage-b.jpg',1)"><img name="Image2" border="0" src="menu%20buttons/homepage-a.jpg" width="157" height="15"></a></div>
<div id="Layer3" style="position:absolute; left:85px; top:215px; width:156px; height:20px; z-index:3"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','menu%20buttons/about-us-b.jpg',1)"><img name="Image3" border="0" src="menu%20buttons/about-us-a.jpg" width="157" height="15"></a></div>
<div id="Layer4" style="position:absolute; left:85px; top:229px; width:155px; height:24px; z-index:4"><a href="slideshow/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image4','','menu%20buttons/gallery-b.jpg',1)" target="_blank"><img name="Image4" border="0" src="menu%20buttons/gallery-a.jpg" width="157" height="15"></a></div>
<div id="Layer5" style="position:absolute; left:85px; top:243px; width:154px; height:23px; z-index:5"><a href="prices.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image5','','menu%20buttons/pricing-b.jpg',1)"><img name="Image5" border="0" src="menu%20buttons/pricing-a.jpg" width="157" height="15"></a></div>
<div id="Layer6" style="position:absolute; left:85px; top:257px; width:155px; height:30px; z-index:6"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','menu%20buttons/fram-style-b.jpg',1)"><img name="Image6" border="0" src="menu%20buttons/fram-style-a.jpg" width="157" height="15"></a></div>
<div id="Layer7" style="position:absolute; left:85px; top:271px; width:154px; height:20px; z-index:7"><a href="contact.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','menu%20buttons/contact-b.jpg',1)"><img name="Image7" border="0" src="menu%20buttons/contact-a.jpg" width="157" height="15"></a></div>
<div id="Layer8" style="position:absolute; left:85px; top:285px; width:155px; height:33px; z-index:8"><a href="faq.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image8','','menu%20buttons/how-to-b.jpg',1)"><img name="Image8" border="0" src="menu%20buttons/how-to-a.jpg" width="157" height="15"></a></div>
<div id="Layer9" style="position:absolute; left:372px; top:194px; width:298px; height:15px; z-index:9"><font face="Myriad Pro" size="-1" color="#996699"><b><font face="Century Gothic" color="#990099">Your 
 message has been sent</font></b></font></div>
<div id="Layer10" style="position:absolute; left:75px; top:302px; width:153px; height:140px; z-index:10"><img src="menu%20buttons/left-banner.jpg" width="177" height="440"></div>
<div id="Layer16" style="position:absolute; left:87px; top:301px; width:153px; height:152px; z-index:16"><a href="special%20offer.htm"><img src="menu%20buttons/free-5x7.jpg" width="155" height="148" border="0"></a></div>
<div id="Layer18" style="position:absolute; left:81px; top:749px; width:753px; height:28px; z-index:18"> 
 <div align="center">
   <p><img src="menu%20buttons/line.jpg" width="737" height="12"></p>
   <p><font face="Myriad Pro"><font face="Myriad Pro"><font face="Myriad Pro"><font color="#996699" size="2"><b><font face="Century Gothic"><a href="index.htm"><font color="#0000CC">home</font></a><font color="#0000FF"> 
     | <a href="about%20studio.htm">about us</a> | <a href="slideshow/index.html">gallery</a> 
     | <a href="prices.htm">pricing</a> | <a href="contact.htm">contact</a></font></font></b></font></font><font color="#996699" size="2"><b></b></font></font><font color="#996699" size="2"><b></b></font></font></p>
   <p><font face="Myriad Pro" size="2" color="#996699"><b><font face="Century Gothic">Slick 
     Studios</font></b><font face="Century Gothic"> - Email : [email protected]</font></font></p>
   <font face="Myriad Pro"></font></div>
</div>
<div id="Layer11" style="position:absolute; left:286px; top:295px; width:510px; height:119px; z-index:19"> 
 <div align="center">
   <p><font face="Century Gothic" color="#990099" size="4"><b>Thank you. </b></font></p>
   <p><font face="Century Gothic" color="#990099">Your message has been sent. 
     We will get back to you as soon as possible</font><font face="Century Gothic"><font size="2"><br>
     </font></font><font face="Century Gothic" size="2">
     <?PHP 
$to = "[email protected]"; 
$subject = "Slick Studios - Client Enquiry";
$headers = "From: slick studios";
$forward = 0;
$location = "";

$date = date ("l, F jS, Y"); 
$time = date ("h:i A"); 



$msg = "Below is the result of your feedback form. It was submitted on $date at $time.\n\n"; 

if ($_SERVER['REQUEST_METHOD'] == "POST") {
foreach ($_POST as $key => $value) { 
	$msg .= ucfirst ($key) ." : ". $value . "\n"; 
}
}
else {
foreach ($_GET as $key => $value) { 
	$msg .= ucfirst ($key) ." : ". $value . "\n"; 
}
}

mail($to, $subject, $msg, $headers); 
if ($forward == 1) { 
   header ("Location:$location"); 
} 
else { 
   echo ; 
} 

?>
     </font></p>
 </div>
</div>
<div id="Layer12" style="position:absolute; left:730px; top:191px; width:80px; height:39px; z-index:20"> 
 <input type="submit" name="Submit" value="Click Here">
</div>
</body>
</html>

 

Link to comment
https://forums.phpfreaks.com/topic/118810-problem-with-php-form/
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.