orangeparrot Posted July 18, 2008 Share Posted July 18, 2008 Hi Guys, I was wondering would somebody be able to help me? I want to make an installer where people can put in the mysql details, and it will also add some tables to the database. The config file is called data.php <?php $hostname_conn_abrv = "localhost"; ////database hostname, usually always localhost $database_conn_abrv = "database"; ////database name $username_conn_abrv = "username"; /// database username $password_conn_abrv = "password"; //// database $conn_abrv = mysql_pconnect($hostname_conn_abrv, $username_conn_abrv, $password_conn_abrv) or trigger_error(mysql_error(),E_USER_ERROR); ?> Any help would be great! Thanks alot. Link to comment https://forums.phpfreaks.com/topic/115457-php-installer/ Share on other sites More sharing options...
JonnyThunder Posted July 18, 2008 Share Posted July 18, 2008 I don't understand what you're after. ??? ??? Link to comment https://forums.phpfreaks.com/topic/115457-php-installer/#findComment-593526 Share on other sites More sharing options...
orangeparrot Posted July 18, 2008 Author Share Posted July 18, 2008 Well I have a system, but to connect it to a database you need to change the values in data.php manually. I would like to make a script to do this for you, and also add tables to the database. Thanks Link to comment https://forums.phpfreaks.com/topic/115457-php-installer/#findComment-593531 Share on other sites More sharing options...
JasonLewis Posted July 18, 2008 Share Posted July 18, 2008 Well think about it. You need a form, should be easy. You submit the form, do some error checking then use different PHP file functions to open, write, close the config file. Look at functions like: fopen() fwrite() fclose() Good luck. Link to comment https://forums.phpfreaks.com/topic/115457-php-installer/#findComment-593539 Share on other sites More sharing options...
orangeparrot Posted July 18, 2008 Author Share Posted July 18, 2008 Cool thanks, I'll have a go Link to comment https://forums.phpfreaks.com/topic/115457-php-installer/#findComment-593541 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.