Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

 
AddSlashes

Another builtin function to use especially with databases, is the good old "addslashes()" function. This adds "slashes" before any quotes in your words as well as some other funny characters that could be risky if left alone. That way, when you retrieve the information, it displays correctly.

Script Name : addslashes() Version :
Developer : Safras Ahamed Date 03/13/2003
Used Functions : addslashes(), stripslashes()
 

<?
global $messages;
$messages=addslashes($messages);
?>


Now, Stip the off, please
If you used the "addslashes()" function with your script then the conpanion function is the one called "stripslashes()".
stripslashes() strips the "slashes" that were put in (logic, no?). That way you wont have parsing problems when the data is retrieved.

<?
global $messages;
$messages=stripslashes($messages);
?>

 
Web Master : Safras Ahamed, Email : safras@ArabChat.Org
Copyright 2003 ArabChat Network