Saving Localstorage Key Into Mysql
We have a small competition in my town where we need to store localstorage keys into MySQL using Ajax. By doing this project, I found few problems. This is my localstorage key and
Solution 1:
Looks like php is adding slashes to your input before you insert your data. This could be caused by magicquotes. Have a look at: http://php.net/manual/en/security.magicquotes.php
If this is the case, the solution is to either turn off magicquotes in php or to use stripslashes()
<?php// Assuming your input is in the input variable$input = stripslashes($_GET['input']);
mysql_query("insert into `table` ( `columnname` ) values( '" . mysql_real_escape_string($input) . "' )");
?>
Post a Comment for "Saving Localstorage Key Into Mysql"