title: Strip Tags from Query
body: <p>I have heard it is bad to allow data entry via an HTML form without first stripping out the tags, so I have come here for help to see if there are ways around this.</p>
  
  <p>I have a query to update records in the database, but I want to strip out the tags first. The query is below. Please if there are any suggestions to do this via PHP </p>
  
  <pre><code>  $res = "UPDATE events SET event_type ='$_POST[event_type]', 
    title = '$_POST[title]', description ='$_POST[description]', 
    location ='$_POST[location]', image ='', image_name ='', 
    address_1='$_POST[address_1]', address_2='$_POST[address_2]', 
    city='$_POST[city]', Postcode='$_POST[Postcode]', country='$_POST[country]', 
    available_ticketqty='$_POST[available_ticketqty]'  WHERE event_id= $_POST[id]";
  </code></pre>