Jump to content

Need some help with config.php file


Eldar

Recommended Posts

Hi, guys, I'm learning PHP and I'm total beginner and I need help.

 

Here's the problem, I have config.php in my website, I need to "update/edit" that file and it should be saved. Like installation for website. 

 

$conf = $TMPL = array();
$conf['host'] = 'localhost';
$conf['user'] = 'username';
$conf['pass'] = 'password';
$conf['name'] = 'name';
$conf['url'] = 'http://yourdomain.com'; 
$conf['mail'] = '[email protected]';
 
I need PHP file which will insert and connect database, and insert mysql dump file (database.sql). In the config.php there are more code bellow, I would like to save that code to, just to edit upfront code. I've did something before and it delete all code bellow and insert the new code. 
 
If anyone can help me please.
Link to comment
https://forums.phpfreaks.com/topic/281713-need-some-help-with-configphp-file/
Share on other sites

$conf['name'] = 'INSERT HERE';                 - > config file

 

<input type="text" class="form_text" name="name" size="30" value="<?php echo $conf['name'] ?>">                        - > install file

 

How to make form in "install file" which will insert in config file where is currently 'INSERT HERE'

i dnt understand what you r asking....

 

for connectivity on localhost..use..

$conn=mysql_connect("localhost","root","");

mysql_select_db("databasename",$conn);

 

if on live server, use...

$conn=mysql_connect("hostname","username","password");

mysql_select_db("databasename",$conn);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.