Jump to content

PHP Text in Email PLEASE!!


littleolemedesigns

Recommended Posts

I am very new to php, but I have experience in html and css and I'm trying to learn php.

 

I'm am desperately trying to customize the welcome email for a client for a Zen Cart shopping cart and I cannot figure out what I'm doing wrong displaying the line breaks in this code so it will display properly in the email.  I've spent hours and hours searching online trying to figure it.. and I'm hoping someone could please take the time to help me here as I know it's probably something very simple that I just don't understand. 

 

I thank-you in advance for your help!!

 

This is the bit of code I'm dealing with:

define('EMAIL_TEXT',"\n\nWe’ve dedicated ourselves to improving the functions and features to make your experience even better when you visit.  Now we have:\n\n<li><strong>A brand new look</strong>\n<li><strong>More products than ever before</strong>\n<li><strong>Additional features to make your shopping experience more efficient</strong>\n\n<li><strong>Added resources for photo lovers, including an interactive Forum and a behind the scenes blog</strong>As friends of Memory Lane Designs, we are offering you a special discount to try out our new store.  We hope you will enjoy your visit and will take advantage of 10% off your purchase as our thanks to you. And for those of you who have purchased before, we welcome your reviews for the products you have purchased.\n\nFor your convenience, we’ve established your account in the new store. To sign in:\n\nStore User Name: Your email address (where this message was sent)\nPassword:  1234\nForum User Name: Your First Name and last initial (example:  Bob_S)\n\n<li>You can create a unique password and even change your email address by signing in to the store and clicking “My Account.”\n<li>To change your Forum user name, click “Forum” on the left side of the site, sign in to the forum using the same password as your store account, and then click “Profile” to change your information.\n\nTo enjoy the 10% discount, just enter MLDFRIENDS, at checkout now through the end of February.  <strong>Consider giving an inspiring gift to the special people in your life for Valentine’s Day!</strong> A Premium Photo Book with photos of your loved ones or custom designed Photo Art that reminds them of what makes them smile.\n\nWith your account, you can now take part in the <strong>various services</strong> we have to offer you. Including:\n\n<li><strong>Permanent Cart</strong> - Any products added to your online cart remain there until you remove them, or check them out.\n<li><strong>Address Book</strong> - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.\n<li><strong>Order History</strong> - View your history of purchases that you have made with us.\n<li><strong>Products Reviews</strong> - Share your opinions on products with our other customers.\n<li><strong>Discussion Forum</strong> – This is a great place to get advice and share ideas on all things Photo." );
define('EMAIL_CONTACT', 'For help with any of our online services, please email the store-owner: <a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">'. STORE_OWNER_EMAIL_ADDRESS ." </a>\n\n");define('EMAIL_GV_CLOSURE',"\n\nSincerely," . STORE_OWNER . "\nMemory Lane Designs\nBe Inspired By Your Life\n". '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'.HTTP_SERVER . DIR_WS_CATALOG ."</a>\n800-717-4511 ");

// email disclaimer - this disclaimer is separate from all other email disclaimers
define('EMAIL_DISCLAIMER_NEW_CUSTOMER', "\n\nThis email address was given to us by you or by one of our customers. If you did not signup for an account, or feel that you have received this email in error, please send an email to %s ");

 

This is my output:

Dear fakey

Welcome to the New Memory Lane Designs’ site!

We’ve dedicated ourselves to improving the functions and features to make your experience even better when you visit. Now we have:

·  A brand new look

·  More products than ever before

·  Additional features to make your shopping experience more efficient

·  Added resources for photo lovers, including an interactive Forum and a behind the scenes blogAs friends of Memory Lane Designs, we are offering you a special discount to try out our new store. We hope you will enjoy your visit and will take advantage of 10% off your purchase as our thanks to you. And for those of you who have purchased before, we welcome your reviews for the products you have purchased. For your convenience, we’ve established your account in the new store. To sign in: Store User Name: Your email address (where this message was sent) Password: 1234 Forum User Name: Your First Name and last initial (example: Bob_S)

·  You can create a unique password and even change your email address by signing in to the store and clicking “My Account.”

·  To change your Forum user name, click “Forum” on the left side of the site, sign in to the forum using the same password as your store account, and then click “Profile” to change your information. To enjoy the 10% discount, just enter MLDFRIENDS, at checkout now through the end of February. Consider giving an inspiring gift to the special people in your life for Valentine’s Day! A Premium Photo Book with photos of your loved ones or custom designed Photo Art that reminds them of what makes them smile. With your account, you can now take part in the various services we have to offer you. Including:

·  Permanent Cart - Any products added to your online cart remain there until you remove them, or check them out.

·  Address Book - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.

·  Order History - View your history of purchases that you have made with us.

·  Products Reviews - Share your opinions on products with our other customers.

·  Discussion Forum – This is a great place to get advice and share ideas on all things Photo.

For help with any of our online services, please email the store-owner: customerservice@memorylanedesigns.com

 

 

Sincerely,Lisa Witherow

Memory Lane Designs

Be Inspired By Your Life

http://www.photo-store.memorylanedesigns.com/

800-717-4511

Copyright © 2008 Memory Lane Designs. Powered by Zen Cart

This email address was given to us by you or by one of our customers. If you did not signup for an account, or feel that you have received this email in error, please send an email to customerservice@memorylanedesigns.com

This email is sent in accordance with the US CAN-SPAM Law in effect 01/01/2004. Removal requests can be sent to this address and will be honored and respected.

 

This is what I desperately need my output to be:

Dear fakey

 

Welcome to the New Memory Lane Designs’ site!

 

We’ve dedicated ourselves to improving the functions and features to make your experience even better when you visit.  Now we have:

 

·  A brand new look

·  More products than ever before

·  Additional features to make your shopping experience more efficient

·  Added resources for photo lovers, including an interactive Forum and a behind the scenes blog

 

As friends of Memory Lane Designs, we are offering you a special discount to try out our new store. We hope you will enjoy your visit and will take advantage of 10% off your purchase as our thanks to you. And for those of you who have purchased before, we welcome your reviews for the products you have purchased.

 

For your convenience, we’ve established your account in the new store. To sign in:

 

Store User Name: Your email address (where this message was sent)

Password: 1234

Forum User Name: Your First Name and last initial (example: Bob_S)

 

·  You can create a unique password and even change your email address by signing in to the store and clicking “My Account.”

·  To change your Forum user name, click “Forum” on the left side of the site, sign in to the forum using the same password as your store account, and then click “Profile” to change your information.

 

To enjoy the 10% discount, just enter MLDFRIENDS, at checkout now through the end of February. Consider giving an inspiring gift to the special people in your life for Valentine’s Day! A Premium Photo Book with photos of your loved ones or custom designed Photo Art that reminds them of what makes them smile.

 

With your account, you can now take part in the various services we have to offer you. Including:

·  Permanent Cart - Any products added to your online cart remain there until you remove them, or check them out.

·  Address Book - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.

·  Order History - View your history of purchases that you have made with us.

·  Products Reviews - Share your opinions on products with our other customers.

·  Discussion Forum – This is a great place to get advice and share ideas on all things Photo.

 

For help with any of our online services, please email the store-owner: customerservice@memorylanedesigns.com

We Hope To Hear From You Soon!

 

 

Sincerely,

Lisa Witherow

Memory Lane Designs

Be Inspired By Your Life

http://www.photo-store.memorylanedesigns.com/

800-717-4511

 

Copyright © 2008 Memory Lane Designs.

Powered by Zen Cart

 

This email address was given to us by you or by one of our customers. If you did not signup for an account, or feel that you have received this email in error, please send an email to customerservice@memorylanedesigns.com

 

This email is sent in accordance with the US CAN-SPAM Law in effect 01/01/2004. Removal requests can be sent to this address and will be honored and respected.

Link to comment
Share on other sites

I believe it actually puts the text of your email like you type it in your script...

 

so I think if you write out the email like you want it seen in your script that may work.  I have had a similar issue to this before, but I can't remember exactly how I got it to format correctly

Link to comment
Share on other sites

I tried that already and it didn't make any difference.  I've also tried substituting the \n for <br> and that didn't have any effect of it at all either.  Even if that would have worked, I would still have this same issue since the

Greeting (Dear Customer Name) and the

Welcome (Welcome to the New Memory Lane Designs) are in a different place and assigned to different variables from the main body of the text.

 

Thank-You for trying to help me and replying so quickly though.  I'm sure someone can help me figure this out.  I've been at it non-stop since last night tweaking and researching everything and haven't had any luck so far.

Link to comment
Share on other sites

Are you suggesting just using a normal return when typing like

 

this?

 

I tried that already.. that's what the other guy suggested and that didn't work at all.  And doesn't solve the fact that I need to control spacing between bits of text contained within three different variable and in three different places in the file.

 

I'm going to include the rest of the code in that file so you guys can see what I mean about the three different variables.  I didn't include it before since I assumed that if I found something to help with spacing in the main part I could use it in the other parts.

 

<?php
/**
* @package languageDefines
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: create_account.php 5745 2007-02-01 00:52:06Z ajeh $
*/

define('NAVBAR_TITLE', 'Create an Account');

define('HEADING_TITLE', 'My Account Information');

define('TEXT_ORIGIN_LOGIN', '<strong class="note">NOTE:</strong> If you already have an account with us, please login at the <a href="%s">login page</a>.');

// greeting salutation
define('EMAIL_SUBJECT', 'Happy New Year from Memory Lane Designs!');
define('EMAIL_GREET_MR', "\n\nDear Mr. %s," . "\n\n");
define('EMAIL_GREET_MS', "\n\nDear Ms. %s," . "\n\n");
define('EMAIL_GREET_NONE', "\n\nDear %s" . "\n\n");

// First line of the greeting
define('EMAIL_WELCOME', "\n\nWelcome to the New Memory Lane Designs’ site!<strong>" );
define('EMAIL_SEPARATOR', '--------------------');
define('EMAIL_COUPON_INCENTIVE_HEADER', 'Congratulations! To make your next visit to our online shop a more rewarding experience, listed below are details for a Discount Coupon created just for you!' . "\n\n");
// your Discount Coupon Description will be inserted before this next define
define('EMAIL_COUPON_REDEEM', 'To use the Discount Coupon, enter the ' . TEXT_GV_REDEEM . ' code during checkout:  <strong>%s</strong>' . "\n\n");
define('TEXT_COUPON_HELP_DATE', '<p>The coupon is valid between %s and %s</p>');

define('EMAIL_GV_INCENTIVE_HEADER', 'Just for stopping by today, we have sent you a ' . TEXT_GV_NAME . ' for %s!' . "\n");
define('EMAIL_GV_REDEEM', 'The ' . TEXT_GV_NAME . ' ' . TEXT_GV_REDEEM . ' is: %s ' . "\n\n" . 'You can enter the ' . TEXT_GV_REDEEM . ' during Checkout, after making your selections in the store. ');
define('EMAIL_GV_LINK', ' Or, you may redeem it now by following this link: ' . "\n");
// GV link will automatically be included before this line

define('EMAIL_GV_LINK_OTHER','Once you have added the ' . TEXT_GV_NAME . ' to your account, you may use the ' . TEXT_GV_NAME . ' for yourself, or send it to a friend!' . "\n\n");

define('EMAIL_TEXT',"\n\nWe’ve dedicated ourselves to improving the functions and features to make your experience even better when you visit.  Now we have:\n\n<li><strong>A brand new look</strong>\n<li><strong>More products than ever before</strong>\n<li><strong>Additional features to make your shopping experience more efficient</strong>\n\n<li><strong>Added resources for photo lovers, including an interactive Forum and a behind the scenes blog</strong>As friends of Memory Lane Designs, we are offering you a special discount to try out our new store.  We hope you will enjoy your visit and will take advantage of 10% off your purchase as our thanks to you. And for those of you who have purchased before, we welcome your reviews for the products you have purchased.\n\nFor your convenience, we’ve established your account in the new store. To sign in:\n\nStore User Name: Your email address (where this message was sent)\nPassword:  1234\nForum User Name: Your First Name and last initial (example:  Bob_S)\n\n<li>You can create a unique password and even change your email address by signing in to the store and clicking “My Account.”\n<li>To change your Forum user name, click “Forum” on the left side of the site, sign in to the forum using the same password as your store account, and then click “Profile” to change your information.\n\nTo enjoy the 10% discount, just enter MLDFRIENDS, at checkout now through the end of February.  <strong>Consider giving an inspiring gift to the special people in your life for Valentine’s Day!</strong> A Premium Photo Book with photos of your loved ones or custom designed Photo Art that reminds them of what makes them smile.\n\nWith your account, you can now take part in the <strong>various services</strong> we have to offer you. Including:\n\n<li><strong>Permanent Cart</strong> - Any products added to your online cart remain there until you remove them, or check them out.\n<li><strong>Address Book</strong> - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.\n<li><strong>Order History</strong> - View your history of purchases that you have made with us.\n<li><strong>Products Reviews</strong> - Share your opinions on products with our other customers.\n<li><strong>Discussion Forum</strong> – This is a great place to get advice and share ideas on all things Photo." );
define('EMAIL_CONTACT', 'For help with any of our online services, please email the store-owner: <a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">'. STORE_OWNER_EMAIL_ADDRESS ." </a>\n\n");define('EMAIL_GV_CLOSURE',"\n\nSincerely," . STORE_OWNER . "\nMemory Lane Designs\nBe Inspired By Your Life\n". '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'.HTTP_SERVER . DIR_WS_CATALOG ."</a>\n800-717-4511 ");

// email disclaimer - this disclaimer is separate from all other email disclaimers
define('EMAIL_DISCLAIMER_NEW_CUSTOMER', "\n\nThis email address was given to us by you or by one of our customers. If you did not signup for an account, or feel that you have received this email in error, please send an email to %s ");

//moved definitions to english.php
//define('TABLE_HEADING_PRIVACY_CONDITIONS', 'Privacy Statement');
//define('TEXT_PRIVACY_CONDITIONS_DESCRIPTION', 'Please acknowledge you agree with our privacy statement by ticking the following box. The privacy statement can be read <a href="' . zen_href_link(FILENAME_PRIVACY, '', 'SSL') . '"><span class="pseudolink">here</span></a>.');
//define('TEXT_PRIVACY_CONDITIONS_CONFIRM', 'I have read and agreed to your privacy statement.');
//define('TABLE_HEADING_ADDRESS_DETAILS', 'Address Details');
//define('TABLE_HEADING_PHONE_FAX_DETAILS', 'Additional Contact Details');
//define('TABLE_HEADING_DATE_OF_BIRTH', 'Verify Your Age');
//define('TABLE_HEADING_LOGIN_DETAILS', 'Login Details');
//define('TABLE_HEADING_REFERRAL_DETAILS', 'Were You Referred to Us?');
?>

Link to comment
Share on other sites

Are you suggesting just using a normal return when typing like

 

this?

 

I tried that already.. that's what the other guy suggested and that didn't work at all.  And doesn't solve the fact that I need to control spacing between bits of text contained within three different variable and in three different places in the file.

 

I'm going to include the rest of the code in that file so you guys can see what I mean about the three different variables.  I didn't include it before since I assumed that if I found something to help with spacing in the main part I could use it in the other parts.

 

<?php
/**
* @package languageDefines
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: create_account.php 5745 2007-02-01 00:52:06Z ajeh $
*/

define('NAVBAR_TITLE', 'Create an Account');

define('HEADING_TITLE', 'My Account Information');

define('TEXT_ORIGIN_LOGIN', '<strong class="note">NOTE:</strong> If you already have an account with us, please login at the <a href="%s">login page</a>.');

// greeting salutation
define('EMAIL_SUBJECT', 'Happy New Year from Memory Lane Designs!');
define('EMAIL_GREET_MR', "\n\nDear Mr. %s," . "\n\n");
define('EMAIL_GREET_MS', "\n\nDear Ms. %s," . "\n\n");
define('EMAIL_GREET_NONE', "\n\nDear %s" . "\n\n");

// First line of the greeting
define('EMAIL_WELCOME', "\n\nWelcome to the New Memory Lane Designs’ site!<strong>" );
define('EMAIL_SEPARATOR', '--------------------');
define('EMAIL_COUPON_INCENTIVE_HEADER', 'Congratulations! To make your next visit to our online shop a more rewarding experience, listed below are details for a Discount Coupon created just for you!' . "\n\n");
// your Discount Coupon Description will be inserted before this next define
define('EMAIL_COUPON_REDEEM', 'To use the Discount Coupon, enter the ' . TEXT_GV_REDEEM . ' code during checkout:  <strong>%s</strong>' . "\n\n");
define('TEXT_COUPON_HELP_DATE', '<p>The coupon is valid between %s and %s</p>');

define('EMAIL_GV_INCENTIVE_HEADER', 'Just for stopping by today, we have sent you a ' . TEXT_GV_NAME . ' for %s!' . "\n");
define('EMAIL_GV_REDEEM', 'The ' . TEXT_GV_NAME . ' ' . TEXT_GV_REDEEM . ' is: %s ' . "\n\n" . 'You can enter the ' . TEXT_GV_REDEEM . ' during Checkout, after making your selections in the store. ');
define('EMAIL_GV_LINK', ' Or, you may redeem it now by following this link: ' . "\n");
// GV link will automatically be included before this line

define('EMAIL_GV_LINK_OTHER','Once you have added the ' . TEXT_GV_NAME . ' to your account, you may use the ' . TEXT_GV_NAME . ' for yourself, or send it to a friend!' . "\n\n");

define('EMAIL_TEXT',"\n\nWe’ve dedicated ourselves to improving the functions and features to make your experience even better when you visit.  Now we have:\n\n<li><strong>A brand new look</strong>\n<li><strong>More products than ever before</strong>\n<li><strong>Additional features to make your shopping experience more efficient</strong>\n\n<li><strong>Added resources for photo lovers, including an interactive Forum and a behind the scenes blog</strong>As friends of Memory Lane Designs, we are offering you a special discount to try out our new store.  We hope you will enjoy your visit and will take advantage of 10% off your purchase as our thanks to you. And for those of you who have purchased before, we welcome your reviews for the products you have purchased.\n\nFor your convenience, we’ve established your account in the new store. To sign in:\n\nStore User Name: Your email address (where this message was sent)\nPassword:  1234\nForum User Name: Your First Name and last initial (example:  Bob_S)\n\n<li>You can create a unique password and even change your email address by signing in to the store and clicking “My Account.”\n<li>To change your Forum user name, click “Forum” on the left side of the site, sign in to the forum using the same password as your store account, and then click “Profile” to change your information.\n\nTo enjoy the 10% discount, just enter MLDFRIENDS, at checkout now through the end of February.  <strong>Consider giving an inspiring gift to the special people in your life for Valentine’s Day!</strong> A Premium Photo Book with photos of your loved ones or custom designed Photo Art that reminds them of what makes them smile.\n\nWith your account, you can now take part in the <strong>various services</strong> we have to offer you. Including:\n\n<li><strong>Permanent Cart</strong> - Any products added to your online cart remain there until you remove them, or check them out.\n<li><strong>Address Book</strong> - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.\n<li><strong>Order History</strong> - View your history of purchases that you have made with us.\n<li><strong>Products Reviews</strong> - Share your opinions on products with our other customers.\n<li><strong>Discussion Forum</strong> – This is a great place to get advice and share ideas on all things Photo." );
define('EMAIL_CONTACT', 'For help with any of our online services, please email the store-owner: <a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">'. STORE_OWNER_EMAIL_ADDRESS ." </a>\n\n");define('EMAIL_GV_CLOSURE',"\n\nSincerely," . STORE_OWNER . "\nMemory Lane Designs\nBe Inspired By Your Life\n". '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'.HTTP_SERVER . DIR_WS_CATALOG ."</a>\n800-717-4511 ");

// email disclaimer - this disclaimer is separate from all other email disclaimers
define('EMAIL_DISCLAIMER_NEW_CUSTOMER', "\n\nThis email address was given to us by you or by one of our customers. If you did not signup for an account, or feel that you have received this email in error, please send an email to %s ");

//moved definitions to english.php
//define('TABLE_HEADING_PRIVACY_CONDITIONS', 'Privacy Statement');
//define('TEXT_PRIVACY_CONDITIONS_DESCRIPTION', 'Please acknowledge you agree with our privacy statement by ticking the following box. The privacy statement can be read <a href="' . zen_href_link(FILENAME_PRIVACY, '', 'SSL') . '"><span class="pseudolink">here</span></a>.');
//define('TEXT_PRIVACY_CONDITIONS_CONFIRM', 'I have read and agreed to your privacy statement.');
//define('TABLE_HEADING_ADDRESS_DETAILS', 'Address Details');
//define('TABLE_HEADING_PHONE_FAX_DETAILS', 'Additional Contact Details');
//define('TABLE_HEADING_DATE_OF_BIRTH', 'Verify Your Age');
//define('TABLE_HEADING_LOGIN_DETAILS', 'Login Details');
//define('TABLE_HEADING_REFERRAL_DETAILS', 'Were You Referred to Us?');
?>

 

I ment that you could just type in the text (with the variables if you need them) and use a html command to go to next row.

 

<?php

echo "Dear Sir,<br />
I hope you will understand what I mean with this.<br />
Let me know if it worked.";
?>

 

So the display of the text will look exactly like I've typed it above without the php and html tags.

Link to comment
Share on other sites

What I was afraid of with the echo command was whether or not it would work while still using the defines in the PHP?  This file is actually called by an HTML file to send the email when a user creates an account with the store.  Is it possible to do it like this:

 

define('EMAIL_TEXT', echo"<br><br>We’ve dedicated ourselves to improving the functions .......

Link to comment
Share on other sites

What I was afraid of with the echo command was whether or not it would work while still using the defines in the PHP?  This file is actually called by an HTML file to send the email when a user creates an account with the store.  Is it possible to do it like this:

 

define('EMAIL_TEXT', echo"<br><br>We’ve dedicated ourselves to improving the functions .......

 

OK, I see your problem. Try this:

 

<?php
echo "\n\nWe’ve dedicated ourselves to improving the functions and features to make your experience even better when you visit. <br /> This is a new row!!!!!!!!<br /> And another one<br /> Now we have:\n\n<li><strong>A brand new look</strong>\n<li><strong>More products than ever before</strong>\n<li><strong>Additional features to make your shopping experience more efficient</strong>\n\n<li><strong>Added resources for photo lovers, including an interactive Forum and a behind the scenes blog</strong>As friends of Memory Lane Designs, we are offering you a special discount to try out our new store.  We hope you will enjoy your visit and will take advantage of 10% off your purchase as our thanks to you. And for those of you who have purchased before, we welcome your reviews for the products you have purchased.\n\nFor your convenience, we’ve established your account in the new store. To sign in:\n\nStore User Name: Your email address (where this message was sent)\nPassword:  1234\nForum User Name: Your First Name and last initial (example:  Bob_S)\n\n<li>You can create a unique password and even change your email address by signing in to the store and clicking “My Account.”\n<li>To change your Forum user name, click “Forum” on the left side of the site, sign in to the forum using the same password as your store account, and then click “Profile” to change your information.\n\nTo enjoy the 10% discount, just enter MLDFRIENDS, at checkout now through the end of February.  <strong>Consider giving an inspiring gift to the special people in your life for Valentine’s Day!</strong> A Premium Photo Book with photos of your loved ones or custom designed Photo Art that reminds them of what makes them smile.\n\nWith your account, you can now take part in the <strong>various services</strong> we have to offer you. Including:\n\n<li><strong>Permanent Cart</strong> - Any products added to your online cart remain there until you remove them, or check them out.\n<li><strong>Address Book</strong> - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.\n<li><strong>Order History</strong> - View your history of purchases that you have made with us.\n<li><strong>Products Reviews</strong> - Share your opinions on products with our other customers.\n<li><strong>Discussion Forum</strong> – This is a great place to get advice and share ideas on all things Photo.";
?>

 

Now you should get a point. Try to play with it a litlle. Echo will not work inside define command. But you dont need to use echo, you can use a comannd for a new row in define. Just put it at the end of the line and that's it.

Link to comment
Share on other sites

I'm probably being a stupid newbie here... but if I can't use echo inside a define.. then how is your solution supposed to work since I have to do this text as a define to make the whole spiderweb of files that call files that call other files still function?  This paragraph has to be defined as 'EMAIL_TEXT'

 

And yeah.. revraz... I noticed that about the break command not showing in there.. sorry about that.. I don't use forums very often if at all.. but i need to start using them.. lol.. this stuff is complicated.  I didn't have anywhere near as much trouble picking up on html and css and AutoLisp by myself... php is like a whole other ball game.

Link to comment
Share on other sites

I'm probably being a stupid newbie here... but if I can't use echo inside a define.. then how is your solution supposed to work since I have to do this text as a define to make the whole spiderweb of files that call files that call other files still function?  This paragraph has to be defined as 'EMAIL_TEXT'

 

And yeah.. revraz... I noticed that about the break command not showing in there.. sorry about that.. I don't use forums very often if at all.. but i need to start using them.. lol.. this stuff is complicated.  I didn't have anywhere near as much trouble picking up on html and css and AutoLisp by myself... php is like a whole other ball game.

 

Here you go.

 

define('EMAIL_TEXT',"\n\nWe’ve dedicated ourselves to improving the functions and features to make your experience even better when you visit. <br /> Now we have:\n\n<li><strong>A brand new look</strong>\n<li><strong>More products than ever before</strong>\n<li><strong>Additional features to make your shopping experience more efficient</strong>\n\n<li><strong>Added resources for photo lovers, including an interactive Forum and a behind the scenes blog</strong>As friends of Memory Lane Designs, we are offering you a special discount to try out our new store.  <br /> <br />We hope you will enjoy your visit and will take advantage of 10% off your purchase as our thanks to you. <br /> <br />And for those of you who have purchased before, we welcome your reviews for the products you have purchased.\n\nFor your convenience, we’ve established your account in the new store. To sign in:\n\nStore User Name: Your email address (where this message was sent)\nPassword:  1234\nForum User Name: Your First Name and last initial (example:  Bob_S)\n\n<li>You can create a unique password and even change your email address by signing in to the store and clicking “My Account.”\n<li>To change your Forum user name, click “Forum” on the left side of the site, sign in to the forum using the same password as your store account, and then click “Profile” to change your information.\n\nTo enjoy the 10% discount, just enter MLDFRIENDS, at checkout now through the end of February.  <strong>Consider giving an inspiring gift to the special people in your life for Valentine’s Day!</strong> A Premium Photo Book with photos of your loved ones or custom designed Photo Art that reminds them of what makes them smile.\n\nWith your account, you can now take part in the <strong>various services</strong> we have to offer you. Including:\n\n<li><strong>Permanent Cart</strong> - Any products added to your online cart remain there until you remove them, or check them out.\n<li><strong>Address Book</strong> - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.\n<li><strong>Order History</strong> - View your history of purchases that you have made with us.<br /> <br />\n<li><strong>Products Reviews</strong> - Share your opinions on products with our other customers.\n<li><strong>Discussion Forum</strong> – This is a great place to get advice and share ideas on all things Photo." );

 

Try to copy/paste it in you script and see the reuslt. Afterwards do the changes as you please and that's it.

Link to comment
Share on other sites

YOU ARE MY NEW FAVORITE PERSON IN THE WHOLE WIDE WORLD budimir... THANK-YOU THANK-YOU THANK-YOU THANK-YOU

 

i don't understand it though.. why does

<br />

work and not

<br>

 

I'm glad that you made it!!!

 

The reason that it didn't work for you is explained below.

 

Difference between HTML and XHTML

In HTML the <br> tag has no end tag.

In XHTML the <br> tag must be properly closed, like this: <br />. 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.