Jump to content

HOw to escape or unescape the data from a php form..


tommytx

Recommended Posts

http%3A%2F%2Fmydomain1.com%2Fping3.php%0D%0Ahttp%3A%2F%2Fmydomain2.com%2Fping3.php%0D%0Ahttp%3A%2F%2Fmydomain3.com%2Fping2.php%0D%0A

 

This is the $_Get from a form sent by a text area...

 

How do  I escape or unescape this to get the basic original data that was in the

 

Here is the origina data before the form sent it to a php program that grabbed the data via $_GET

 

<textarea>

http://mydomain1.com/ping3.php

http://mydomain2.com/ping3.php

http://mydomain3.com/ping2.php

</textarea>

 

Thanks for any help.

 

Tom

 

Link to comment
Share on other sites

$rawdata = url_decode($_GET['textareafield']);

 

$rawdata will then contain the text within the form field "textareafield" (replace it with the name of your textarea's field name), without all the url entities.

Link to comment
Share on other sites

Thanks a bunch... worked great....

Small note.. for anyone else using this... I could not get it to work with the url_decode function, but when looking it up it appears it should be urldecode.... but you are the best... thanks..... problem solved...

But what is a little _ here and there among friends..

 

Thanks again....

 

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.