title: Database error trying to insert numbers and letters in to a table but only numbers work
body: <p>I have tried to change my old script from msql to mysqli or PDO. The script works when I send an Ajax call to the PHP file.
  I use:
  <a href="http://publiadds.com/Villageop/testAjaxCall.php?points=1998a" rel="nofollow">http://publiadds.com/Villageop/testAjaxCall.php?points=1998a</a></p>
  
  <p>but when stored the letters are transformed in number and I need to insert letters and numbers on that table.</p>
  
  <p>My code is:</p>
  
  <pre><code>&lt;?php
  header('Access-Control-Allow-Origin: *');
  error_reporting(E_ALL);
  ini_set('display_errors',1);
  
  include_once 'dbconnect.php';
  
  if(isset($_REQUEST['points'])){
  
       //Lightly sanitize the GET's to prevent SQL injections and possible XSS attacks
      $points = htmlentities($_REQUEST['points']);
  //    $statement = $dbh-&gt;prepare("UPDATE `users` SET user_points = user_points +'$points' WHERE user_id = " . $_SESSION['user']);
      $statement = $dbh-&gt;prepare("UPDATE `users` SET user_id = user_id +'$points' WHERE id = 4 ");
      $state = $statement-&gt;execute();
  
      //$sql = mysql_query("INSERT INTO `publiadd_registervillageop`.`users` (`user_points`) VALUES ('points');");   
  
       if($state){    
            //The query returned true - now do whatever you like here.
            echo 'Your Points was saved. Congrats!';
  
       }else{
  
            //The query returned false - you might want to put some sort of error reporting here. Even logging the error to a text file is fine.
            echo 'There was a problem saving your points. Please try again later.';    
       }    
  }else{
       echo 'Your points wasnt passed in the request. Make sure you add ?name=NAME_HERE&amp;score=1337 to the tags.';
  }
  ?&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;body bgcolor="#ffffff"&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>My problem is when I send the Ajax call in insert the data on that table but the data I need to insert is letters and numbers but it seems the script transforms the letters in numbers. How can I solve this?</p>