Zen Cart Logo
Forums / General Questions / EZpage stripping slashes Form php output

EZpage stripping slashes Form php output

Views: 949

Results 1 to 2 of 2
5 Sep 2011, 4:44 PM
#1
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

EZpage stripping slashes Form php output

I have a special order form created and added to an ezpage. I have the php code for form output sent to email and form successfully submitted message added to another ezpage. When the special order form ezpage is filled in and submitted it triggers the form successfully submitted message ezpage. The form output is sent to email and the customer is shown the form submitted successfully message. That all is working as expected. The only problem I am encountering is when I receive the email the form output content is not in list form. It all runs in sentence form making it difficult to sort through.

When I go in to view the php code in the ezpage I see the backslash \ is being removed. This is an example of how the code should look.

$formcontent=" Fist-name: $firstname \n Last-name: $lastname \n Phone: $phone \n Email: $email \n Order-number: $ordernumber \n Message: $message";

instead the back slash is being removed from in front of n

$formcontent=" Fist-name: $firstname n Last-name: $lastname n Phone: $phone n Email: $email n Order-number: $ordernumber n Message: $message";

I'm using ezpage in text mode.

To allow the php to work in ezpage I have used the code from this thread

http://www.zen-cart.com/forum/showpost.php?p=219348&postcount=7

Any idea of what needs to be done to stop the backslash from being removed?

5 Sep 2011, 9:19 PM
#2
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Re: EZpage stripping slashes Form php output

From the code on the thread
http://www.zen-cart.com/forum/showpost.php?p=219348&postcount=7

<div><?php eval(stripslashes('?>' . $var_pageDetails->fields['pages_html_text'])); ?></div>

I tried removing, stripslashes leaving the code like this

<div><?php eval(('?>' . $var_pageDetails->fields['pages_html_text'])); ?></div>

to see if it would make any difference and it doesn't.