Current location: Hot Scripts Forums » Programming Languages » PHP » I need help asap on html/php problem


I need help asap on html/php problem

Reply
  #1 (permalink)  
Old 12-07-10, 02:01 PM
walter801 walter801 is offline
Newbie Coder
 
Join Date: Dec 2010
Location: London
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rolleyes I need help asap on html/php problem

Please i need an urgent help. I created an HTML contact form and also I have written the PHP script for the contact form but I am having problems in the next step to take in making it work. I have hosted it, but it didnt work. PLEASE is anyone there who can help me in solving it? if possible steps in ensuring that it works.

Below is the html and php code.

Please I will be grateful if I can know the steps to make it work.

Thanks



THE HTML CODE FOR THE CONTACT FORM
+
HTML Code:
 	<form action="contactus.php" method="post" name="form1" id="form1" onsubmit="MM_validateForm('name','','R');return document.MM_returnValue">
<p>
<label>Name:<br />
<input type="text" name="name" id="name" />
</label>
<br /><br />
<label>Email:<br />
<input type="text" name="email" id="email" />
</label>
<br /><br />
<label>Phone:<br />
<input type="text" name="phone" id="phone" />
</label>
<br /><br />
<label>Subject:<br />
<input type="text" name="subject" id="subject" />
</label> 
<br />
<label>Comment<br/>
<textarea name="comments" id="comments" cols="40" rows="5"></textarea>
</label>
<p>
<label>
<input name="Submit" type="submit" id="Submit" onclick="MM_validateForm('name','','R','email','', 'RisEmail','phone','','RisNum','subject','','R','c omments','','R');MM_validateForm('name','','R','em ail','','RisEmail','phone','','NisNum','subject',' ','R','comments','','R');MM_validateForm('name','' ,'R','email','','RisEmail','phone','','RisNum','su bject','','R','comments','','R');return document.MM_returnValue" value="Submit" />
</label>
<br />
</p>
</form>
+
THE PHP SCRIPT
+
PHP Code:

     <?php

/* Email Variables */
$emailSubject 'contactform'
$webMaster 'debestconsultant.gmail.com';

/* Data Variables */
$name $_POST['name'];
$email $_POST['email'];
$subject $_POST['subject'];
$comments $_POST['comments'];

$body = <<<EOD
<br><hr><br>
Name: 
$name <br>
Email: 
$email <br>
Subject: 
$subject <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>sent message</title>
<meta http-equiv="refresh" content="3;URL=http://www.unique-personnel.com/contact.html">
<style type="text/css">
<!--
body {
background-color: #FFF486;
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">Thanks We will get back to you soon</div>
</div>
</body>
</html>
EOD;
echo 
"$theResults";
?>
+
Hope to hear from you soon. Thanks
Reply With Quote
  #2 (permalink)  
Old 12-08-10, 02:27 AM
Frement Frement is offline
Newbie Coder
 
Join Date: Jul 2010
Posts: 19
Thanks: 0
Thanked 1 Time in 1 Post
$webMaster = 'debestconsultant.gmail.com';

You are trying to send to invalid email. Try: debestconsultant@gmail.com

Last edited by Frement; 12-08-10 at 02:44 AM.
Reply With Quote
Reply

Bookmarks

Tags
code, html, php, script request


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Thumbnail Viewer Problem (Help needed ASAP) _yo_wasup_ JavaScript 0 09-30-09 02:07 PM
login, roles problem dbrook007 ASP.NET 10 11-10-06 03:42 PM
Form Display Problem neevrap02 Visual Basic 1 09-05-06 05:18 AM
Can Someone help with this problem? -ASAP please imparator JavaScript 1 10-12-05 07:05 PM
Asp and Microsoft Access 2002 problem gop373 ASP 2 10-06-04 09:13 AM


All times are GMT -5. The time now is 08:46 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.