i make a installation process of script like vbulletin and others forum it write all the information to the file and i use this script but when i write here $ sign it give me error undefined variable in this line ...
so how to write replace function of php that it will replace any sign in $ sign
PHP Code:
$school_nam=$_POST['sname'];
$school_desc=$_POST['sdesc'];
$db_host=$_POST['dbhost'];
$db_nam=$_POST['dbname'];
$db_use=$_POST['dbuser'];
$db_pas=$_POST['dbpass'];
$admin_user=$_POST['auser'];
$admin_pass=$_POST['apass'];
$file="../prunner/vars.php";
$fh=fopen($file,'w');
$string="<?php &host_name='$db_host'; &db_name='$db_nam'; &db_user='$db_use'; &db_pass='$db_pas'; &school_name='$school_nam'; &school_desc='$school_desc'; ?>";
$writeit=fwrite($fh,$string);
if(!$writeit){
echo "Some Files Missing Contact Us";
echo "<FORM> ";
echo "<INPUT type='button' value='Close Window' onClick='window.close()'> ";
echo "</FORM>";
}
else{
echo "File Writing Successfully Now You Will Be Redirected To Step 2";
}
fclose($fh);
& replace in $ sign any way to replace then please make this script correct and post it so i can easily do this work