0

Hi,

I am trying to fix this simple coding problem for many days, but its not working everytime, I am posting in hope that some one will help this time.

I am having two pages Page1.php and Page2.php. Page1 is having a text box when I enter some code here its not receiving exactly in Page2 everytime its missing some characters, because of that I am not able to use the received code in Page2.

Page1.php

     <form name="f1" method="post" action="/Page2.php">
     <input type=text name=url>
     <input type=submit>
     </form>

Page2.php

    <?php
        echo stripslashes(html_entity_decode($_POST['url']));
    ?>

Example
I entered below value in Page1's text box

https://www.google.com/maps?ie=UTF8&amp;ll=42.956358,-85.660089&amp;spn=0.146992,0.308647&amp;t=m&amp;z=12&amp;output=embed 

In Page2 I am getting the below value

https://www.google.com/maps?ie=UTF8&ll=42.956358,-85.660089&spn=0.146992,0.308647&t=m&z=12&output=embed 

.

ie. '&amp;' is received as '&' in Page2.

My expectation is to receive whatever text/code I enter in Page1's textbox should be received as it is with out any changes in Page2.

Thanks

3
Contributors
6
Replies
7
Views
5 Years
Discussion Span
Last Post by rrlogu
0

Thanks for your reply, its working fine in IE but not working in Chrome, any idea?

0

Do you mean Chrome is still decoding the entered text despite removing the html_entity_decode? Or is something else happening? Have you changed anything in the code from your previous post?

0

I didn't do any changes in code, something is happening in Chrome.

0

encode is not working, its giving the following error message.

Call to undefined function html_entity_encode()

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.