<?php
$filename = "news.php";
$file = fopen( $filename, "w");
$string = "<center><table><tr><td>Posted on: $date Title: $title </td></tr><tr><td> $news </td></tr><tr><td>Currently listening to: $listen </td></tr><tr><td>Mood:</td><td>"+"<img src='/jiemmotions/"+"$mood"+".gif'>"+"</td></tr></table></center><p>";
fwrite( $file, $string );
fclose( $file );
?>
<html>
<head>
<title>Orenji's Blog Updating system</title>
</head>
<body>
<?php
if( file_exists( $filename ) ){
echo("Done now what do you want to do next?");
} // end if
else{
echo( "Error Problem occured please contact Daniel" );
} // end else
?>
<br><a href="http://ichigokenkyuujo.com/"> Back to the ichigokenkyuujo</a>
</body>
</html>
You mispelled "$string." That's one reason why your code wouldn't work. You would have been writing a null value to your file.
You needed use curly braces ("{" and "}") in one line blocks of code. Or be consistant, and use them around all blocks of code.
When you declare the value of a string, it should be all on one line.
I see variables being referenced that were not declared. Either you have some complex system going (and I would need to see all the source files to put it into context), or you need to read from another file to get those values.
I've just fixed the noticable errors of this file. There may be deeper errors in your code that I cannot see just by looking at one file.
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/pichunet/public_html/ichigokenkyuujo/Blog/added.php on line 32
This error has to so with your bad string. You need to concatenate your strings, or put them all on one line.