I'm writing out to a file that includes PHP code in it....here is a snippet of what is being written out to the file
fwrite ($news_file, "<? include (\"/home/mysite/mydb/mydbstuff.php\"); $linkID=MYSQL_CONNECT($hostname,$username,$password) OR DIE(\"Unable to connect to database\"); ");
fwrite ($news_file, "mysql_select_db(\"$dbName\", $linkID) or die(\"Unable to select database\"); ?>");
when written out to the new file it comes out like this
<? include ("/home/mysite/mydb/mydbstuff.php"); Resource id #1=MYSQL_CONNECT(actualhostname,actualusername,actualpassword) OR DIE("Unable to connect to database"); mysql_select_db("actualdbname", Resource id #1) or die("Unable to select database"); ?>
how do i fix this?