title: Trying to store IP Address in Database. SQL Errors
body: <p>Here is my code I'm trying to use to store the ip address of the client. I'm trying to store the ip address to an unsigned int, by trying to do something seen in this question: <a href="https://stackoverflow.com/questions/5133580/which-mysql-datatype-for-an-ip-address">Which MySQL datatype to use for an IP address?</a></p>
  
  <p>Here is my code:</p>
  
  <pre><code>$client_ip = $_SERVER['REMOTE_ADDR'];
  
  $ip_insert = "SELECT INET_ATON('$client_ip')";
  
  $sql = "INSERT INTO rtv_sign_cispa (name_cispa,ip_cispa,email_cispa,message_cispa) VALUES ('$name','$ip_insert','$email','$message')";
  </code></pre>
  
  <p>There are other things in that statement being stored but just ignore those ones, they work, it's the ip address that isn't.</p>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Error: 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 '192.168.2.1')','email@email.com','Hmmmm')' at line 1</p>
  </blockquote>
  
  <p>The ip address after near does in fact show the correct IP, I just switched it to a local ip for security reasons of course. email@email.com and Hmmm is from a form that is filled out to activate this so don't really mind that.</p>
  
  <p>Does anyone know what I'm doing wrong? I'm kinda new to SQL.</p>