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

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

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?

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

Change decode to encode, try that and post back

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

Call to undefined function html_entity_encode()

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.