Re: [PHP] install /setup script

2004-10-11 Thread Minuk Choi
Well, you can just put up a regular form, something to the effect of

Hostname 
User Name
Password 
...
...
...
etc.

and when you submit that form, those variables will be accessible under the 
$_POST array

such as
$hostName = $_POST['Hostname'];
$userName=$_POST['username'];
etc.
NOTE that doing it this way presents several security issues
 1) You should add some checking before connecting to the MySQL database; a 
user can specify "mysql" as the database and you'd have your tables 
installed in the mysql database(which is used by mysql for its 
privilege/user tables and such... I normally make it a practice to NOT mess 
it with the mysql tables).  (e.g. If you plan to drop the database and 
repopulate it, then specifying "mysql" for database would destroy MySQL's 
core tables)
 2) If you are not familar with the $_POST array, it is the data that you 
specified between the  and  and , there is a $_GET array.  But many 
people frown if you have a form that asks for username and password and you 
submit that via GET(as the values you specified would be appended at the end 
of the URL).

HTH
-Minuk
- Original Message - 
From: "bigmark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 11, 2004 12:14 AM
Subject: [PHP] install /setup script


Thanks for the help with the createdb and tables form, now can anyone help
with changing the config.php
(ie: host,user,password) via a form also-- so that it doesnt have to be 
done
manually within the config script.

Basically i want an install/setup page with all the form elements--
Hostname-
username-
Password-
Choose database name-
Then it installs the database and tables then redirects to the main site
page and the config.php is already configured for them
BigMark
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] install /setup script

2004-10-10 Thread bigmark
Thanks for the help with the createdb and tables form, now can anyone help
with changing the config.php
(ie: host,user,password) via a form also-- so that it doesnt have to be done
manually within the config script.

Basically i want an install/setup page with all the form elements--

Hostname-
username-
Password-
Choose database name-

Then it installs the database and tables then redirects to the main site
page and the config.php is already configured for them


BigMark

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php