Go Daddy Contact Form Woes

VoltronFutura

New Member
I've got my php set up, but this shows at the top of the page once you send the information. Also, the email isn't sending. Can someone help me?

Here's my php.
PHP:
<?php

/* Gathering Data Variables */

	$name = $_POST['name'];
	$email = $_POST['email'];
	$company = $_POST['company'];
	$phone = $_POST['phone'];

/* Subject and Email Variables */
	$toemail = '[email protected]';
	$subject = 'Newsletter Subscriber';
	
	$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>
Company: $company <br>
Phone: $phone <br>
EOD;

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


/* Results rendered as HTML */

	$theResults = <<<EOD
<!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" content="text/html; charset=UTF-8" />
<title>Space Designs - Contact Team Space</title>
<META NAME="keywords" CONTENT="logo design, graphic design, websites, design, advertising, web design, web development, mobile websites, mobile, qr codes, branding, team space, aliens, custom qr codes, ufos, space designs, greenville, south carolina, sc, easley, north carolina, tennessee, texas, new york, georgia, spartanburg, greer, anderson, marketing firm, upstate, palmetto">
<META NAME="description" CONTENT="We are THE cutting edge full service marketing and advertising firm in the upstate.">
<META NAME="copyright" content="Copyright (c) 2010 Space Designs, All Rights Reserved">
<META NAME="author" content="Space Designs">

<link type="text/css" rel="stylesheet" href="css/styles.css" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-17138937-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>

<body>

<div id="container">
	        
<div id="thankFolder">
  </div>
        
        <div id="home"><a href="../index.html"><img src="slices/index/home.png" border="0" /></a>
</div>
        
        <div id="about"><a href="about.html"><img src="slices/index/about.png" border="0"  /></a>
        </div>
                        
		<div id="services"><a href="services.html"><img src="slices/index/services.png" border="0" /></a>
        </div>
        
		<div id="portfolio"><a href="logo.html"><img src="slices/index/portfolio.png" border="0" /></a>
        </div>
        
        <div id="emailInfo"><a href="mailto:[email protected]"><img src="slices/contact/emailInfo.png" border="0" /></a>
        </div>
        
        
<div id="copyright">
        </div>

       
        
</div>
    

</body>
</html>
EOD;

echo "$theResults";

?>
 

VoltronFutura

New Member
I don't know. I tried to use Go Daddy's php form but it wasn't working so I found this and tried to make it work.

Here's another one that I used on another website, but I can't get it to work for this one.

PHP:
<?php
    $request_method = $_SERVER["REQUEST_METHOD"];
    if($request_method == "GET"){
      $query_vars = $_GET;
    } elseif ($request_method == "POST"){
      $query_vars = $_POST;
    }
    reset($query_vars);
    $t = date("U");

    $file = $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" . $t;
    $fp = fopen($file,"w");
    while (list ($key, $val) = each ($query_vars)) {
     fputs($fp,"<GDFORM_VARIABLE NAME=$key START>\n");
     fputs($fp,"$val\n");
     fputs($fp,"<GDFORM_VARIABLE NAME=$key END>\n");
     if ($key == "redirect") { $landing_page = $val;}
    }
    fclose($fp);
    if ($landing_page != ""){
	header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
    } else {
	header("Location: http://".$_SERVER["HTTP_HOST"]."/");
    }


?>
 
Top