PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
The script below works great except I'm a bit clueless on where I actually have to apply (and how I would apply) stripslashes() as PHP is adding escaping slashes to the output!
Echoing get_magic_quotes_gpc(); I get 1. I'm simply editing the contents of a file that are written in to the textarea. I'm pretty sure I want to use stripslashes. Thanks for pointing out get_magic_quotes_gpc();. Once I get this working I'm going to look in to authentication, WOOHOO!
if (get_magic_quotes_gpc()) {$template = stripslashes($_POST['template']);}
if (get_magic_quotes_gpc()) {stripslashes(fwrite ($file, $_POST['textarea']));}
if (get_magic_quotes_gpc()) {fwrite ($file, stripslashes($_POST['textarea']));}
...and there was much rejoicing. yay.
Winter changed in to spring, spring changed in to summer, summer changed back in to winter, and winter gave spring and summer amiss and went straight on in to autumn.