Question about http POST

  • Автор темы Автор темы Macs Bank
  • Дата начала Дата начала

Macs Bank

Client
Регистрация
25.04.2014
Сообщения
59
Реакции
3
Баллы
8
This is driving me crazy. I'm sure its very simple.

Lets assume I have a zenno variable called STRING1.
The string variable has some html in it such as "mary & bill".

Lets say I want to use http post to submit the variable string to a php script that is adding it to mysql for me.

When I use http_post with urlencoded and use the data like this:

string1={-Variable.string1-}&string2={-Variable.string2-}

For some reason, it isn't passing the entire variable to my script. It is only passing "mary" instead of the entire thing.

Can someone help me figure out what I'm doing wrong.

Thanks!!
 
I suppose because "&" used as separator between paramters in post request.
You should remove this - "&". Spaces will be urlencoded by the program itself when sending post request.
 
Thanks for the reply.

Yeah, I figure that was the issue, but wasn't sure if there way a way to encode it differently or something else? I can easily use a "replace" command to get rid of it or change it to something else, but that is just one example, there are a ton of other htmlspecialchar's that I would have to convert as well....
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)