Javascript storing variable -
i want store variable client side, currently, have few selection (javascript variable, cookie, session), because want reduce workload server, incoming parameter not check on server side.
for example,
client side
<div id="showmoney"></div> <script> var money=10000; $('#showmoney').html(money); function changemoney() { { pass variable 'money' ajax php...} } </script>
php side
<? $money = $_post['money']; $sql = "update user_details set money = ".$money." uid = 123"; { query...} ?>
are there method make more secure, because afraid can modify javascript variable tools(firebug? if yes, how?)
thanks lot~:)
every variable not want user change (such price tag) has stored on server , not on client. there lot of ways change client sends you, , firebug simplest tool. more sophisticated tools allow intercept , edit every http request..
Comments
Post a Comment