Thanks. Knowing that GoDaddy has magic quotes turned on solved the issue.
All I had to do was add a str_replace that changed the \" back to " and
it works fine now.
Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
From: "Kevin Bucknum" <Kevin@xxxxxxxxxxxxxxxxxxx>
To: "Web Enabling the IBM i \(AS/400 and iSeries\)"
<web400@xxxxxxxxxxxx>,
Cc: "WEB400" <web400-bounces@xxxxxxxxxxxx>
Date: 05/07/2014 02:43 PM
Subject: Re: [WEB400] Weird happening when html from data includes
HREF
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxx>
This page has some notes, and a link to a few methods of disabling it.
http://www.php.net/manual/en/security.magicquotes.php
Another option is to move where you create the hyperlink. Post
$ErrorMsg, $Quantity, and $ScreenToRedisplay and build $ItemMessageText
on your target page instead of your source page.
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Larry
Kleinman
Sent: Wednesday, May 07, 2014 12:42 PM
To: Web Enabling the IBM i (AS/400 and iSeries)
Cc: WEB400
Subject: Re: [WEB400] Weird happening when html from data includes HREF
Is there any way to turn it off for this page only? If not, it seems
like no matter what i do - including Peter's suggestion of using double
quotes and eliminating the concatenation - I will not be able to get rid
of the escaped quotes.
Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
From: "Kevin Bucknum" <Kevin@xxxxxxxxxxxxxxxxxxx>
To: "Web Enabling the IBM i \(AS/400 and iSeries\)"
<web400@xxxxxxxxxxxx>,
Date: 05/07/2014 12:53 PM
Subject: Re: [WEB400] Weird happening when html from data
includes
HREF
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxx>
On the Godaddy server magic quotes is turned on.
http://php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Larry
Kleinman
Sent: Wednesday, May 07, 2014 10:00 AM
To: WEB400@xxxxxxxxxxxx
Subject: [WEB400] Weird happening when html from data includes HREF
Hi all - I am having something odd happen with two PHP pages. On the
first page, I have the following code:
<input type="hidden"
name="ItemMessageText"
value=" <?php
If ($ErrorMsg == '')
echo $Quantity. " added to your cart. Continue shopping or <a
href="cart.php?FromScreen=" . $ScreenToRedisplay .""> go to
cart.</a> ";
Else
echo $ErrorMsg; ?> ">
This page POSTs to a second page, which contains this code.
$ItemMessageText = $_POST["ItemMessageText"];
When $ErrorMsg is blank, the value of ItemMessageText on the second page
is
3 added to your cart. Continue shopping or <a href
=\"cart.php?FromScreen=/1dev/adult.php\"> go to cart.</a>
Notice that the quotes surrounding the name of the hyperlnk have been
escaped - there is a \ prior to the quotes. I have no idea why this is
happening and it causes the link to fail
To make it more odd, the problem happens when the script is run on a
GoDaddy server, but works fine (quotes are not escaped) when run on
ZendServer on an IBM i box
Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
Kevin Bucknum
Senior Programmer Analyst
MEDDATA/MEDTRON
Tel: 985-893-2550
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
Kevin Bucknum
Senior Programmer Analyst
MEDDATA/MEDTRON
Tel: 985-893-2550
As an Amazon Associate we earn from qualifying purchases.