Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
php form results error
Old 11-19-2008, 11:58 AM php form results error
Earnersguide's Avatar
Experienced Talker

Posts: 46
Name: Hari Prasad
Location: india
Trades: 0
hi friends, i got problem while creating a new form for my new website.
the form is here. Its a php script and the script process the form information and send a email to the webmaster. But the results i received was only <br>

Results are:

<br><hr><br>
Email: <br>
Name: <br>
Phone number: <br>
budget: <br>
Number of travelers: <br>
Comments: <br>
Newsletter: <br>

my is in this area
$headers . = "Content-type; text/html\r\n";

please help me
thanks.....
__________________

Please login or register to view this content. Registration is FREE

Earnersguide is offline
Reply With Quote
View Public Profile Visit Earnersguide's homepage!
 
 
Register now for full access!
Old 11-19-2008, 05:07 PM Re: php form results error
Extreme Talker

Posts: 246
Trades: 3
Can you post the script.php code?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
CouponGuy is offline
Reply With Quote
View Public Profile
 
Old 11-20-2008, 12:52 AM Re: php form results error
Earnersguide's Avatar
Experienced Talker

Posts: 46
Name: Hari Prasad
Location: india
Trades: 0
this is the script my friend
my doubt is in the red line below. the teacher spelled the word some thing like "peiod".


<?php

/* Subject and Email Variables */

$emailSubject = 'hari scripting!';
$webMaster = 'rgstravels2003@gmail.com';

/* Gathering information variables */

$emailField = $_POST['email'];
$nameField = $_POST['name'];
$phoneField = $_POST['phone'];
$budgetField = $_POST['budget'];
$travelersField = $_POST['travelers'];
$commentsField = $_POST['comments'];
$newsletterField = $_POST['newsletter'];

$body = <<<EOD
<br><hr><br>
Email: $email <br>
Name: $name <br>
Phone number: $phone <br>
budget: $budget <br>
Number of travelers: $travelers <br>
Comments: $comments <br>
Newsletter: $newsletter <br>
EOD;

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

/* Results render as HTML */

$theResults = <<<EOD
<html>
<head>
<title>Rgs air travels. in - travel made easy-Homepage</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #f1f1f1;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #666666;
text-decoration: none;
}
-->
</style>
</head>

<div>
<div align="left">Thank you for your interest! Your email will be answered very soon!</div>
</div>
</body>
</html>
EOD;
echo "$theResults";

?>
__________________

Please login or register to view this content. Registration is FREE

Earnersguide is offline
Reply With Quote
View Public Profile Visit Earnersguide's homepage!
 
Old 11-20-2008, 04:37 AM Re: php form results error
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
Use phpmailer class and your problem will be gone.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 11-24-2008, 10:38 AM Re: php form results error
Average Talker

Posts: 19
Trades: 0
Really simple to correct mate.

$emailField = $_POST['email'];
$nameField = $_POST['name'];
$phoneField = $_POST['phone'];
$budgetField = $_POST['budget'];
$travelersField = $_POST['travelers'];
$commentsField = $_POST['comments'];
$newsletterField = $_POST['newsletter'];

$body = <<<EOD
<br><hr><br>
Email: $email <br>
Name: $name <br>
Phone number: $phone <br>
budget: $budget <br>
Number of travelers: $travelers <br>
Comments: $comments <br>
Newsletter: $newsletter <br>
EOD;

You set variables with Field at the end such as $emailField but you're trying to output the variable $email. Make sure these are the same.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Limotek is offline
Reply With Quote
View Public Profile Visit Limotek's homepage!
 
Reply     « Reply to php form results error
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24841 seconds with 12 queries