לוח שנה

   
|!|

 
 
Prev     Next
13-11-09, 12:32   # 9
Garli
 
: Oct 2009
: 3

Garli   

:

:
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
dbhost: <input type="text" name="dbhost" /> <br />
dbuser: <input type="text" name="dbuser" /> <br />
dbpass: <input type="password" name="dbpass" /> <br />
dbname: <input type="text" name="dbname" /> <br />
<input type="submit" name="install" value="install" />
</form>

<?php

if(isset($_POST['install'])){
$file = "config.php";
file_get_contents($file);
$edit = '
<?php

$dbhost = "'.$_POST['dbhost'].'";
$dbuser = "'.$_POST['dbuser'].'";
$dbpass = "'.$_POST['dbpass'].'";
$dbname = "'.$_POST['dbname'].'";

mysql_connect($dbhost,$dbuser,$dbpass)or die(mysql_error());
mysql_select_db($dbname)or die(mysql_error());

?>';
file_put_contents($file,$edit);

}

?>
  Reply With Quote
 

: 1 (0 - 1 )
 

« | »

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

HTML




GMT +2. 10:31.

VBulletin 3.8.6
©
(1997) "