Jump to content

going into the database .. going out


n8w

Recommended Posts

I just want to make sure my data is clean going into the database and legible going out .. would this function work?


//in
function going_in($text){
$text = trim($text);
$text = mysql_real_escape_string($text);
$text=htmlentities($text);
return $text;
}

//out
function going_out($text){
$text = stripslashes($text);
$text = html_entity_decode($text);
return $text;
}

 

 

Link to comment
https://forums.phpfreaks.com/topic/160586-going-into-the-database-going-out/
Share on other sites

  • 3 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.