How to save to database special chars
Display Page
$ibtext = htmlspecialchars($_SESSION['ibtext']);
Save / Read Page
$ibtext = addslashes(($_REQUEST['ibtext']);
Insert to database
$_SESSION['ibtext'] = stripslashes($ibtext);
Impotent Comment:
Works only when passing by post!