Form Help needed!

This is a discussion on "Form Help needed!" within the PHP Forum section. This forum, and the thread "Form Help needed! are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 21st, 2006, 19:07
New Member
Join Date: Jun 2006
Location: Billericay, Essex.
Age: 15
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Form Help needed!

Can anyone help me with my form?

www.cbwd.co.uk/contact.php

The problem is...
Parse error: syntax error, unexpected T_STRING in /home/cbwd/public_html/form.php on line 75

And the code on line 75 is...
PHP: Select all

mail('chris@cbwd.co.uk' 'Form Contact Feedback' $body
And my whole php section in the page is...
PHP: Select all

<?php
      $name 
$_REQUEST['name'];
      
$email $_REQUEST['email'];
      
$subject $_REQUEST['subject'];
      
$message $_REQUEST['message'];
      
      
//email below
      
$body " $name\n $email\n $subject\n $message\n"
      
mail('email here*' 'Form Contact Feedback' $body)
      
?>
Anyone help? Thanks in advance.

*It wont display my email, but my email is there in the code.
Reply With Quote

  #2 (permalink)  
Old Jun 21st, 2006, 19:45
New Member
Join Date: Jun 2006
Location: Pennsylvania, United States
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Form Help needed!

I am still pretty new to php myself but shouldn't there be a semi-colon after "$body)"?
Reply With Quote
  #3 (permalink)  
Old Jun 21st, 2006, 20:04
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: Form Help needed!

It should be:
PHP: Select all

     $recpemail "youremailaddresshere";
     
$semail "whoyouwanttosendemailtohere";
     
$message "Message of the email here";
     
$headers "MIME-Version: 1.0 \r\n";
     
$headers .= "Content-type: text/html; ";
     
$headers .= "charset=iso-8859-1\r\n";
     
$headers .= "From: $recpemail\r\n";
          
     
mail($semail,$subject,$message,$headers); 
Reply With Quote
  #4 (permalink)  
Old Jul 2nd, 2006, 20:08
New Member
Join Date: Jul 2006
Location: CloneASite.com
Age: 21
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Form Help needed!

yes, its a basic mail(); syntax error.. refer php.net always... http://php.net/manual/function.mail.php

Thank you,
Karthi Keyan
Reply With Quote
Reply

Tags
form, help, needed

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
very basic form prefill command needed antonyx JavaScript Forum 1 Apr 18th, 2008 12:09
Help needed with subscription form JewelEnterprises Web Page Design 6 Sep 3rd, 2007 11:48
Form Validation Help needed please chimp Web Page Design 4 Dec 2nd, 2006 22:38
Form security help needed moisea PHP Forum 3 Nov 6th, 2006 10:10
Form Help Needed Please Learning1 PHP Forum 1 Jan 21st, 2006 16:58


All times are GMT. The time now is 08:32.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43