05.09.2015, 15:19
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:
* text param with hebrew
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
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;
}
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();
If I put English text it appears
** Sorry for my bad english