Problem with mysql

0

I would like to know what I can do for mysql to recognize the "+" character, as it shows a part of my site the name with "+" and when I make a request on $_GET I need to retrieve this name by url but he does not recognize what I could do to him to recognize the "+" sign in url ?

This and the page before clicking the button read more. she is calling the name normal.

Nowthisandthepagewhenyouclickthebuttonreadmoreheisnotrecognizingthe"+" sign, since I only removed it and recognized what I could do to recognize it?

    
asked by anonymous 25.05.2016 / 16:50

1 answer

1

I know the problem has already been solved but I will leave one more option and try to explain the first.

urlencode (): Basically turns white spaces into a% sign of%, is used more in search fields, forms. Special characters are +

rawurlencode () Transforms whitespace into% w /%, but also transforms accents, special characters into% w /%.

Examples

We have server-side

echo "http://algumsite.com.br"
. "/categoria/" . rawurlencode("últimas notícias")
. "/busca?q=" . urlencode("situação do Brasil");

And the result on the client side is the second:

http://algumsite.com.br/categoria/%C3%BAtimas%20not%C3%ADcias/busca?q=situa%C3%A7%C3%A3o+do+Brasil

Basically that's it, if you have any further questions you can leave in the comments.

    
25.05.2016 / 18:14