4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 php help
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
speakerboxx
Junior WebHelper
Junior WebHelper


Joined: 20 Jan 2004
Posts: 2

PostPosted: Tue Jan 20, 2004 6:13 pm (20 years, 3 months ago) Reply with QuoteBack to Top

I've created a contact form with flash and php. My php coding has been ok until I decided to add the date(). My php is:



<?php
$today = date("F j, Y, g:i a");
$to = "jdbinsulationsltd@f2s.com";
$subject = "Customer Enquiry";
$msg = "$today\n\nCompany: $company\nName: $name\n\n Enquiry: \n $enquiry\n";
mail($to, $subject , $msg, "From: JD Bruce Website\nReply-To: $emailinput\n");
?>

Problem is the email I receive from the php coding is wrong, see below. Why do I get everything that is in bold? The text inside the bold text is the message I wanna show only.

January 20, 2004, 6:03 pm

Company: asdasd
Name: asdasd

Enquiry:
<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#333333">jdajdlasjdkalsjdlkasnd</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#333333">dlffsd&apos;;lf&apos;;sdfsdfsdf</FONT></P></TEXTFORMAT>
OfflineView User's ProfileFind all posts by speakerboxxSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Tue Jan 20, 2004 7:16 pm (20 years, 3 months ago) Reply with QuoteBack to Top

What are you trying to do to the contents of your <textarea>? None of the code you posted should be inside it, at any rate, and that is why the browser is sending it back as content.

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
speakerboxx
Junior WebHelper
Junior WebHelper


Joined: 20 Jan 2004
Posts: 2

PostPosted: Wed Jan 21, 2004 2:09 am (20 years, 3 months ago) Reply with QuoteBack to Top

Shocked Please can you elaborate on your findings! I'm new to php. How can I simplify code or alter to stop the problem.
OfflineView User's ProfileFind all posts by speakerboxxSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Wed Jan 21, 2004 5:08 pm (20 years, 3 months ago) Reply with QuoteBack to Top

Wherever the code is for the <textarea>, remove whatever's inside it (make a backup of the file before you make the changes though).

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
jayant
Team Member



Joined: 07 Jan 2002
Posts: 262
Location: New Delhi, India

PostPosted: Fri Jan 23, 2004 5:10 pm (20 years, 2 months ago) Reply with QuoteBack to Top

before doing sending the message. use strip_tags() function to removed all html/php tags and then send in email

________________________________
Jayant Kumar
Member of the 4WebHelp Team
Nibble Guru - Computing Queries Demystified
GZip/ Page Compression Test
OfflineView User's ProfileFind all posts by jayantSend Personal MessageVisit Poster's WebsiteYahoo MessengerMSN Messenger
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.240496 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme