Kudose it is a fix I did not get it first. This is the complete code in case that can help someone else
THANK YOU
<?php
// GET the varibles from the form above
$moveon=$_GET[moveon];
$dbhost=$_GET["dbhost"];
$dbuname=$_GET["dbuname"];
$dbpass=$_GET["dbpass"];
$dbname=$_GET["dbname"];
//Following code overwrites myvaribles.php4 with the new data
if($moveon==2) {
$fh=fopen("config.php","w");
fwrite($fh,"<?php\n");
fwrite($fh,"\$dbhost = \"$dbhost\";\n");
fwrite($fh,"\$dbuname = \"$dbuname\";\n");
fwrite($fh,"\$dbpass = \"$dbpass\";\n");
fwrite($fh,"\$dbname = \"$dbname\";\n");
fwrite($fh,"?>");
fclose($fh);
}
// include the varibles in this file
include("config.php");
?>
<form action="<?php echo $php_SELF?>">
<input type="text" name="dbhost" value="<?php echo"$dbhost" ?>">
<input type="text" name="dbuname" value="<?php echo"$dbuname" ?>">
<input type="text" name="dbpass" value="<?php echo"$dbpass" ?>">
<input type="text" name="dbname" value="<?php echo"$dbname" ?>">
<input type="hidden" name="moveon" value=2>
<input type="submit" name="Submit">
</form>