We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

luman on 09/02/06


Tagged

variables secure


Versions (?)


make_safe


Published in: PHP 


URL: http://www.phphacks.com/content/view/30/33/

  1. function make_safe($variable) {
  2. $variable = addslashes(trim($variable));
  3. return $variable;
  4. }

Report this snippet 

You need to login to post a comment.