Page 1 of 1

problems writing to a file

Posted: Wed Sep 17, 2003 8:58 pm
by psychotomus

Code: Select all

<center>
<a href="main.php?id=profile">Profile</a>
     <a href="main.php?id=newsletter">Newsletter</a>
     <a href="main.php?id=portfolio">Portfolio</a>
     <a href="main.php?id=employment">Employment</a> 
     <a href="main.php?id=contact">Contact</a>
</center>
thats what i write to a file threw a form

this is the outcome

Code: Select all

<center>
<a href="main.php?id=profile">Profile</a>
     <a href="main.php?id=newsletter">Newsletter</a>
     <a href="main.php?id=portfolio">Portfolio</a>
     <a href="main.php?id=employment">Employment</a> 
     <a href="main.php?id=contact">Contact</a>
</center>
this is how i write the file

Code: Select all

$pw=$_POST&#1111;'pw'];
$id=$_POST&#1111;'id'];
$info=$_POST&#1111;'info'];

$fp = fopen('files/'.$id, "w");
fwrite($fp, $info);
fclose($fp);
how i can i get it to write to the file without adding \

Posted: Wed Sep 17, 2003 9:12 pm
by McGruff
magic quotes - devil's spawn - switch em off

Posted: Wed Sep 17, 2003 10:58 pm
by psychotomus
how i switch them off?

Posted: Wed Sep 17, 2003 11:28 pm
by scorphus
Change the option on your php.ini. Locate these lines

• magic_quotes_runtime = On
• magic_quotes_sybase = On

and change them to Off. Take the time to read this: http://www.php.net/configuration before changing these options.

Cheers,
Scorphus.

Posted: Thu Sep 18, 2003 5:37 am
by twigletmac
If you can't adjust your php.ini: stripslashes()
Mac