Store JavaScript Result In Php variable or give me some correct PHP md5 function
<p>I have Some Passwords which contain some special and methimatical chracters like this password "HHE1134ƒ" if i want to generate password with php md5() then this not give me correct hashes like this "679b6dc6122a9c83ed31476ee82af36e".</p>

<p>So i have Java Script which can generate correct hash for my passwords 
But how can i store this value to mysql </p>

<p>my code is given below please Help Me.</p>

<pre><code>$result = mysql_query("SELECT * FROM `table`") or die(mysql_error());

while ($row = mysql_fetch_assoc($result))
{

$user_id = $row['user_id'];
$firstname = $row['firstname'];
$lastname = $row['lastname'];
$spno = $row['spno'];
$password = $row['password'];

$tmp =  "&lt;script type='text/javascript'&gt; document.write(MD5('".$password."'));&lt;/script&gt;";

$query1="UPDATE `wp_110504users` SET `user_pass` = '$tmp' WHERE `user_login` = '$user_id'";

mysql_query($query1) or die(mysql_error());
}
</code></pre>

<p>this will give me error like </p>

<pre><code>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'text/javascript'&gt; document.write(MD5('HW72'));' WHERE `user_login` = '0' at line 1
</code></pre>

<p>?></p>

<p>Some one tell me use Ajax, Please tell me how can i use Ajax for this code can you give me an example .....</p>
