Skip to main content

My Escape Data Function

My Escape Data Function

Quick and handy function to purify data before entering into the database

function escape_data($data){
   $data = mysql_escape_string(trim($data));
   $data = htmlspecialchars($data, ENT_QUOTES, 'UTF-8');
   return = $data;
}
Main Category
  • PHP
  •  
Secondary Categories
  • Handy Functions
  •  
 
Jon Moore

Search form

Jon Moore

Tips 'n' Snips

 
  • Home
  • General
  • Drupal
    • Drupal 6
    • Drupal 7
    • Module Building
  • HTML & CSS
  • Javascript
  • jQuery
  • PHP
    • CodeIgniter
    • Handy Functions
    • MySQL
  • WordPress
  • About

BBC Technology News

  • Huawei launches new legal challenge against US ban
  • Lotus Evija: The £2.2m electric hypercar
  • Cave diver tells court Elon Musk tweets 'humiliated' him
  • Mars rover aims to grab a piece of history
  • BolaWrap: LA police to use 'Batman-style' device to snare suspects
More

Sitepoint

  • The Real Future of Remote Work is Asynchronous
  • 7 Ways Developers Can Contribute to Climate Action
  • How to Divert Traffic Using IP2Location in a Next.js Website
  • 10 Zsh Tips & Tricks: Configuration, Customization & Usage
  • Building a Habit Tracker with Prisma, Chakra UI, and React
More

Heart Internet

  • 15 web design books of 2019 that you should read
  • 12 podcasts for every creative person’s commute
  • Ten TED Talks every designer and web creative should watch before 2019 is over
  • The rise of the robots: Will AI take over graphic design?
  • 34 WordPress tutorials for modern web development
More
 

Backend Coders

  • PHP
  • Handy PHP Functions
  • PHP MySQL

Frontend Coders

  • HTML & CSS
  • jQuery
  • Javascript

CMS/CMF Systems

  • Drupal
  • Drupal 6 Specific
  • Drupal 7 Specific
  • Drupal Module Building
  • WordPress

About

  • Home
  • About
 

© Jon Moore 2019

All stock images are from www.istockphoto.com