devjs11
devjs11

Reputation: 1958

jQuery serialize issue

Making a form submit with jquery ajax and retriving form data with serialize function. But i have a problem with links inside datastring as it converts them into something like this:

url=http%3A%2F%2Fwww.sitename.com

but i would like to return normal link like

http://www.sitename.com

and then i dont know how to reconvert this link back inside the php final file to return it. Maybe something like to string conversion or whats the idea about this?

Thank you.

Upvotes: 1

Views: 352

Answers (1)

Radoslav Georgiev
Radoslav Georgiev

Reputation: 1376

echo rawurldecode("http%3A%2F%2Fwww.sitename.com"); // http://www.sitename.com

https://www.php.net/manual/en/function.rawurldecode.php is what you need :)

Upvotes: 1

Related Questions