done it and its working
<?php
header("Location: install.php")
?>
<?
include ('../userpic.php');
$u = strip_tags ($_POST['user']);
$p = strip_tags ($_POST['pass']);
$h = strip_tags ($_POST['host']);
$pf = strip_tags ($_POST['prefix']);
$sp = strip_tags ($_POST['url']);
$sm = strip_tags ($_POST['email']);
$dbn = strip_tags ($_POST['name']);
$myfile ="test.php";
$fh = fopen($myfile, 'w') or die("file wont open");
$stringData = '<?PHP
$hostname = '.$h.';
$user = '.$u.';
$pass = '.$p.';
$dbname = '.$dbn.';
$prefix = '.$ph.';
$sitepath = '.$sp.';
$sitemail = '.$sm.';
parse_str("$QUERY_STRING");
$db = mysql_connect(
"$hostname",
"$user",
"$pass")
or die("Could not connect.");
if(!$db)
die("no db");
if(!mysql_select_db("$dbname",$db))
die("No database selected.");
include ("constrings.php")
?>';
fwrite($fh, $stringData);
fclose($fh)
?>
I aslo need to take data base strings out and include them in
constrings.php
if(!get_magic_quotes_gpc())
{
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
else
{
$_GET = array_map('stripslashes', $_GET);
$_POST = array_map('stripslashes', $_POST);
$_COOKIE = array_map('stripslashes', $_COOKIE);
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
🙂 thank you all for your help i fort id post wroking code incase any 1 needs it or wants to no hao its done 🙂