Hebrew in HTTP
#1

Hello,
I try to send a POST request with Hebrew, but does not return anything and I do not know why...
here is my code:
pawn Код:
public OnGameModeInit() {
    HTTP(0, HTTP_POST, Website, "server=1&username=Test&id=-1&text=שלום", "OnPlayerSendMessage");
    return 1;
}
* text param with hebrew

PHP код:
        if(isset($_POST['username']) and isset($_POST['id']) and isset($_POST['text']) and !empty($_POST['text'])) {
        require_once(
'mysql.php');
        
$playerID      $mysql->real_escape_string($_POST['id']);
        
$username      $mysql->real_escape_string($_POST['username']);
        
$text          $mysql->real_escape_string($_POST['text']);
        
$mysql->query("INSERT INTO `chat` (`pID`, `Username`, `Text`) VALUES ('{$playerID}', '{$username}', '{$text}')") or die($mysql->error);
        
$mysql->close(); 
Everything is fine but the text does not appear as if I did not write anything in the parameter "text"
If I put English text it appears

** Sorry for my bad english
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)