Hi, I posted some vars from a form to following code which rewrites my entire .php file. Problem is that is also removes the PHP tags <? ?> and I can no longer read the vars in config.php back into the form.
Is there a way to keep the <? ?> and to write only some of the vars.
$fp, "\$$MyEmail=\"$MyEmail\";\n" );
$fp, "\$$Myaddr=\"$Myaddr\";\n" );
/ rewrites to the entire file /
$fp = @fopen ( "config.php", "w" );
while ( list ( $varname, $varvalue ) = each ( $HTTP_POST_VARS ) )
{
fwrite ( $fp, "\$$varname=\"$varvalue\";\n" );
}
fclose ( $fp );
Thanks !