Well through jquery i am doing an ajax request to send through a cell开发者_JAVA技巧 number in the format of +1234567 but if i access it on the other end using $_POST['cell'];
the plus is gone, where could it be?
This depends on how you are performing the query.
If you do:
$.ajax({
url: 'foo.php',
data: 'cell=+1234567'
});
You will loose the +
because it because it has to be URL encoded (+
means space in the URL). I would recommend you this which will take care of encoding:
$.ajax({
url: 'foo.php',
data: { cell: '+12345' }
});
精彩评论