September 2nd, 2000, 12:19 AM
Here's the problem. I got my last post figured out but there is a little bug I want to squash.
I have an options section for my news updater which allows you to change the poster name, the poster email, and the file in which posts go to.
So in options.php3 this is what it looks like after the user has submitted the form:
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
$fp = fopen("variables.txt","r+");
$write_to_file = "
$name = "$edit_name";
$email = "$edit_email";
$file = "$edit_file";
fwrite($fp, $write_to_file, strlen($write_to_file));
So what is the problem you ask? Check out http://worldzone.net/arts/swanicke/variables.txt and you will see that there is some useless code at the end.
This usless code is showing up at the top of every single admin page for my script! I have no idea why it's not being deleted and overwrited like the rest of the code in variables.txt.
September 2nd, 2000, 02:05 AM
try out putting 'w' or 'w+' inplace of
'r+' in fopen().
September 2nd, 2000, 02:32 AM
Ahhhh thank you Anitha.. my script of a lifetime is complete I am getting Core PHP Programing in a few days so t should be getting even better