Web Design Forum  
 
Go Back   Web Design Forum > Web and Graphic Design > Web Design

Reply
 
LinkBack Thread Tools Display Modes
Old 11-03-2010, 08:41 PM   #1
New Member
 
Join Date: Oct 2010
Location: US
Posts: 11
Default Go Daddy Contact Form Woes

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 Code:
<?php

/* Gathering Data Variables */

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

/* Subject and Email Variables */
    
$toemail 'info@space-designs.com';
    
$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:sarah@space-designs.com"><img src="slices/contact/emailInfo.png" border="0" /></a>
        </div>
        
        
<div id="copyright">
        </div>

       
        
</div>
    

</body>
</html>
EOD;

echo 
"$theResults";

?>
VoltronFutura is offline   Reply With Quote


Old 11-03-2010, 08:48 PM   #2
New Member
 
Join Date: Oct 2010
Location: US
Posts: 11
Default

When I said "this" shows at the top, I meant this:

Warning: mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in D:\Hosting\5824542\html\gdform.php on line 24

Also, here's the link to the website: www.space-designs.com/contact.html
VoltronFutura is offline   Reply With Quote
Old 11-03-2010, 08:55 PM   #3
Gold Member
 
smoovo's Avatar
 
Join Date: Oct 2010
Posts: 388
Default

Why is the form action points to "gdform.php"?
__________________
SMooVo - Web Design & Development
contact@smoovo.com
www.SMooVo.com
smoovo is offline   Reply With Quote
Old 11-03-2010, 09:01 PM   #4
New Member
 
Join Date: Oct 2010
Location: US
Posts: 11
Default

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 Code:
<?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"]."/");
    }


?>
VoltronFutura is offline   Reply With Quote
Old 11-03-2010, 09:05 PM   #5
Gold Member
 
smoovo's Avatar
 
Join Date: Oct 2010
Posts: 388
Default

It's OK.

Go to this thread Sending Forms to Email and look for #4. I post there the clean code by w3schools.

Use only that code without anything else.
__________________
SMooVo - Web Design & Development
contact@smoovo.com
www.SMooVo.com
smoovo is offline   Reply With Quote


Old 11-03-2010, 09:07 PM   #6
New Member
 
Join Date: Oct 2010
Location: US
Posts: 11
Default

Thanks a ton. However, I have only one question. Do I save the body and html tags within the php document?
VoltronFutura is offline   Reply With Quote
Old 11-03-2010, 09:11 PM   #7
New Member
 
Join Date: Oct 2010
Location: US
Posts: 11
Default

Also, is there a way to display my own personal Thank You page once the email is sent?
VoltronFutura is offline   Reply With Quote
Old 11-03-2010, 09:11 PM   #8
Gold Member
 
smoovo's Avatar
 
Join Date: Oct 2010
Posts: 388
Default

Yes, just use your design and structure.
__________________
SMooVo - Web Design & Development
contact@smoovo.com
www.SMooVo.com
smoovo is offline   Reply With Quote
Old 11-03-2010, 09:14 PM   #9
New Member
 
Join Date: Oct 2010
Location: US
Posts: 11
Default

I'm sorry I am asking a lot questions, but where do I insert my html into the php form?
VoltronFutura is offline   Reply With Quote
Old 11-03-2010, 09:16 PM   #10
New Member
 
Join Date: Oct 2010
Location: US
Posts: 11
Default

Nevermind. I tried the php inside the html and body tags, but at the end. You are a life saver. I could kiss your feet.
VoltronFutura is offline   Reply With Quote
Reply

Tags
contact, form, php

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:21 PM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.