Hi all,
Im currently working on a sync function for the account passwords from all accounts on multiple da servers. Da support pointed me to a feature http://www.directadmin.com/features.php?id=581
there are a few environmental variables:
Im writing the script in php so my problem is how can i use the above variables in my php script.
Im not really familiar with shell scripts
i got this for testing so far:
Thanks alot.
Im currently working on a sync function for the account passwords from all accounts on multiple da servers. Da support pointed me to a feature http://www.directadmin.com/features.php?id=581
there are a few environmental variables:
Code:
username=username
passwd=password
home=/home/username
Im writing the script in php so my problem is how can i use the above variables in my php script.
Im not really familiar with shell scripts
i got this for testing so far:
PHP:
#!/usr/local/bin/php
<?
define("DB_HOST","localhost");
define("DB_USERNAME","dbuser");
define("DB_PASSWORD","dbpass");
define("DB_NAME","dbname");
$username = '';
$password = '';
$dbhandle = mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD);
$selected = mysql_select_db(DB_NAME ,$dbhandle);
$sql = mysql_query("SELECT * FROM `database_table` WHERE `Username` = '".$username."' ");
echo mysql_num_rows($sql);
?>
Thanks alot.