ios - STHTTPRequest "& char" how i can send this char to a php page? -


my ios app have send/retrive date throught php pages. example call usingi sthttprequest :

 __block sthttprequest *up = [sthttprequest requestwithurlstring:[nsstring stringwithformat:@"%@%@",pathserver,@"retrivedata.php"]];  up.encodepostdictionary=no; up.postdataencoding=nsutf8stringencoding;  up.postdictionary = @{@"name":@"name", @"surname":@"surname"}; 

it's ok until decide insert lik :

up.postdictionary = @{@"name":@"na&me", @"surname":@"surname"}; 

in way a

 print_r($_post); 

in retrivedata.php results in:

array (  [name] => na  [surname] => surname  ) 

the name cutted @ "&" char index. have tried no success like:

utf8_encode/utf8_decode($name) 

it seems name arrives retrivedata.php cutted, can't use chars conversion/encoding... in sthttprequest have tried set:

up.encodepostdictionary=yes; 

with setting can send "&" $amp; if select retrive value can't convert normal string by

 html_entity_decode(); 

it still remain

& 

how can do? sthttprequest send 'na&me' comes blank $_post[] in retrivepage.php

i not familiar shttprequest, should url encode it. "na%26me" when url encoded. later in post have "na&me"

hope helps :)


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -