Page 1 of 1

stripslashes()

Posted: Thu Jun 19, 2008 7:16 pm
by akjackson1
Hi,
I am using TinyMCE to edit a html that has the text for the main page, the only problem is, it puts slashes all through it, I tried the stripslashes() but I can't seem to get it to work. here is what I have:

Code: Select all

<?php
$fp = fopen('../index_text.html', 'w+');
stripslashes($elm2);
fwrite($fp, $elm2);
fclose($fp);
header('Location: index.php');
?>

Re: stripslashes()

Posted: Thu Jun 19, 2008 11:19 pm
by WebbieDave
Change line 3 to:

Code: Select all

$elm2 = stripslashes($elm2);
For more info, check out:
http://us.php.net/manual/en/function.stripslashes.php

Re: stripslashes()

Posted: Thu Jun 19, 2008 11:22 pm
by akjackson1
Thanks, but I figured out a different way, I used php.ini to disable it...

Re: stripslashes()

Posted: Thu Jun 19, 2008 11:24 pm
by WebbieDave
Good job.