PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 11th, 2005, 12:41 AM
shashgo shashgo is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2005
Posts: 3 shashgo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 48 m 23 sec
Reputation Power: 0
Angry Hoe to output php variables in html output

Ive got a php script to process a form. How do I output the
variables to a html email?

For example, in the followin lines I am trying to create a $message variable that will have the html code that will be mailed to an email. I want the values that are read from the form to be part of the $message, as I have done. But all I gt is a blank email with only everything out side the <?php ?> tags. Whats going on?
The email looks like

The information you submitted on is:

Your name:
Your address:

--------------------
$message = '
<html>
<head>
<title>Steadfast Home Inspections, LLC - Order received</title>
</head>
<body>
<p>The information you submitted on <?php date("F j, Y, g:i a"); ?> is:</p>
<table>
<tr>
<td>Your name</td>
<td><?php $name; ?></td>
</tr>
<tr>
<td>Your address</td>
<td><?php echo $street.", ".$city.", ".$state." ".$zip; ?></td>
</tr>
</body>
</html>

Reply With Quote
  #2  
Old November 11th, 2005, 09:09 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
PHP Code:
<html>
<
head>
<
title>Steadfast Home InspectionsLLC Order received</title>
</
head>
<
body>
<
p>The information you submitted on <?= date("F j, Y, g:i a"); ?> is:</p>
<table>
<tr>
<td>Your name</td>
<td><?=$name ?></td>
</tr>
<tr>
<td>Your address</td>
<td><?php echo $street.", ".$city.", ".$state." ".$zip?></td>
</tr>
</body>
</html> 
take that $message = line off... if it's a part of something greater, please explain... I would output my entire page normally and just insert the variables where you want them displayed... you don't need to cast the entire thing to another variable.

Notice the change to your Name variabled and the Date section.

Reply With Quote
  #3  
Old December 12th, 2010, 06:46 AM
haryramesh haryramesh is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2010
Posts: 1 haryramesh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 33 sec
Reputation Power: 0
You are trying to do this i guess

split your message and try..it will work

$message = '
<html>
<head>
<title>innovativestudio.net</title>
</head>
<body>
<p>Hi';
$message .=$visitor;
$message .='</p>
<p><b>Thanks for writing. Our Support team will contact you soon.</b></p>
<table>
<tr>
<td>
Your email id:
</td>
<td>';
$message .=$visitormail;
$message .='</td></tr></table>';

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Hoe to output php variables in html output


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap