Hey,
I never thought I would be asking for help, but I just need a little wisdom. OK, I'm co-developing this CMS Like software called myHome, and I need to write a file that will on upload of files via FTP, it will go to install.php (The install file I'm trying to create). It doesn't use any Databases or anything YET, so that is good; All I need it to do is create the initiate password and user name for the Admin Control Panel, and write the site URL, site email and other basic information to the config.php file. Should I use the include function or the fwrite to external fire function? Are there any alternatives? How would I have the user input the information into a field, click submit, like the password, site email, etc, and then have that write to the config.php file? I want the installer to be similar to a phpBB Forum (Or any other forum installer) Installer File, where the user inputs information and it gets written to the file. Any help is appreciated!
Thanks 
- kab012345
Well, building a CMS is a great learning experiance. However, I have spent the past year building a new CMS/Framework that can render pages within .004 of a second and has all the features someone could need. So if you wait to wait another month you can download it ;P
Anyway, here is how you would make a install file. You can also download phpBB and look at their install file.
<?php
/*
If someone pressed the "submit" button
(which can only happen if they have seen and filled out the form!)
*/
if(isset($_POST['submit'])) {
// Put the $_POST/form data into the file text
$text = '<?php'. "\n".
'$db_name = "'. $_POST['db_name']. '";'. "\n".
'$db_user = "'. $_POST['db_user']. '";'. "\n".
'$db_pass = "'. $_POST['db_pass']. '";'. "\n".
'$db_host = "'. $_POST['db_host']. '";'. "\n".
'$admin_name = "'. $_POST['admin_name']. '";'. "\n".
'$admin_pass = "'. $_POST['admin_pass']. '";'. "\n".
'?>';
// 1) Store the file name in a string (this is the file handle).
$filename = "config.php";
// 2) Open the file
$filehandle = fopen($filename, 'w')
// 3) Write the text above to the file
fwrite($filehandle, $text);
// 4) Close the file handle
fclose($filehandle);
//Now you have a file called "config.php" in the same place as the install.php file.
}
?>
Please Enter your Site Information:
<form action="" method="post">
Database Name: <input name="db_name" type="text" value=""><br />
Database User: <input name="db_user" type="text" value=""><br />
Database Pass: <input name="db_pass" type="text" value=""><br />
Database Host: <input name="db_host" type="text" value="localhost"><br />
<br />
Admin Name: <input name="admin_name" type="text" value=""><br />
Admin Pass: <input name="admin_pass" type="text" value=""><br />
<input name="submit" type="submit" value="Submit">
</form>How can we make this installer to write the MySQL tables strait into the database?
Kab and I are trying to make our own forum I can write the SQL but cannot get it go into the database without manualy doing so.
It sounds like you should learn how to use PHP and MySQL before you try to write a forum. http://php.net/mysql
I know the PHP needed, I just don't know that one bit I looked on that site too >