I have a problem with jQuery ajax in sending information.
The PHP code is supposed to detect Hebrew letters and convert them to Arabic letters according to the transcription rules.
this is my code (jQuery code):
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
$("#input").keyup(function() {
var input = $("#input").val();
$("#text").load("changetext.php", {input:input});
});
});
</script>
</head>
<body dir="rtl">
<center>
<input type="text" id="input" />
<div id="text"></div>
<button id="go">חפש!</button>
</center>
</body>
</html>
And this is the PHP page (where the conversion of letters occurs):
<?php
$input = $_POST['input'];
str_replace("א", "ا", $input);
str_replace("ב", "ب", $input);
str_replace("ג'", "ج", $input);
str_replace("ד", "د", $input);
str_replace("ד'", "ذ", $input);
str_replace("ה", "ه", $input);
str_replace("ו", "و", $input);
str_replace("ז", "ز", $input);
str_replace("ח", "ح", $input);
str_replace("ח'", "خ", $input);
str_replace("ט", "ط", $input);
str_replace("ט'", "ظ", $input);
str_replace("י", "ي", $input);
str_replace("כ", "ك", $input);
str_replace("ל", "ل", $input);
str_replace("מ", "م", $input);
str_replace("נ", "ن", $input);
str_replace("ס", "س", $input);
str_replace("ע", "ع", $input);
str_replace("פ", "ف", $input);
str_replace("צ", "ص", $input);
str_replace("ק", "ق", $input);
str_replace("ר", "ر", $input);
str_replace("ש", "ش", $input);
str_replace("ת", "ت", $input);
str_replace("ת'", "ث", $input);
str_replace("ס'", "ض", $input);
str_replace("ט'", "ظ", $input);
str_replace("ר'", "غ", $input);
str_replace("א'", "ﺀ", $input);
echo $input;
?>
This code don't work, and I don't know why.