It is mainly done through mysql_query().
The following will add a new
<a href="http://www.bodhosting.com/ " target="_blank" title=" MYSQL " style="color:#000000;text-decoration:none;">MYSQL</a> user by inserting a new row into table user in MySQL Database -
include 'library/config.php';
include 'library/opendb.php';
mysql_select_db($mysql);
$query = "INSERT INTO user (host, user, password, select_priv, insert_priv, update_ priv) VALUES ('localhost', 'phpcake', PASSWORD('mypass'), 'Y', 'Y', 'Y')";
mysql_query($query) or die('Error, insert query failed');
$query = "FLUSH PRIVILEGES";
mysql_query($query) or die('Error, insert query failed');
include 'library/closedb.php';
?>
Cheers
