Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['add']))
- {
- include 'library/config.php';
- include 'library/opendb.php';
- $username = $_POST['username'];
- $password = $_POST['password'];
- $query = "INSERT INTO user (host, user, password, select_priv, insert_priv, update_ priv) VALUES ('localhost', '$username', PASSWORD('$password'), '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';
- echo "New MySQL user added";
- }
- else
- {
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement