pdo - How to avoid php escape string on online hosting? -


when type don't, save don\'t database. tested code on wamp offline server , save don't. when test code on online hosting, save don\'t. how make online hosting don't use excape string?

codes :

<?php if (isset($_post['btn_edit'])) { $description = $_post['description']; } $sql = "update expense set description=? spender_id=?"; $q = $conn->prepare($sql); $result = $q->execute(array($description, $_session['user_id'])); ?> <input type="text" name="description" size="70" value="" /> 

disable magic_qoutes or change statement

 $description = $_post['description']; 

as

 $description = stripslashes($_post['description']); 

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -