1 | djbrain | 44355 |
2 | subofferul | 5220 |
3 | robica | 4610 |
4 | krystyana84 | 3980 |
5 | elena2008 | 2690 |
Membri inscrisi | 96840 |
Intrebari | 35993 |
Raspunsuri | 164903 |
baza de date de
jan23
|
|||||||||
<html> <head> <title>Add New MySQL User</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?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 { ?> <form method="post"> <table width="400" border="0" cellspacing="1" cellpadding="2"> <tr> <td width="100">Username</td> <td><input name="username" type="text" id="username"></td> </tr> <tr> <td width="100">Password</td> <td><input name="password" type="text" id="password"></td> </tr> <tr> <td width="100"> </td> <td> </td> </tr> <tr> <td width="100"> </td> <td><input name="add" type="submit" id="add" value="Add New User"></td> </tr> </table> </form> <?php } ?> </body> </html> <style type="text/css"> .style1 { width: 615px; } .style2 { text-align: right; width: 85px; } </style> |
Tags:
|
||||||||
|
Comentariul lui:
04-07-2010 10:41:18
Data:
|
||||||
|
||||||
* | Raspuns acceptat | Voturi: | 3 Voteaza |
Link sponsorizat | |
Comentariul lui:
04-07-2010 11:25:23
Data:
|
||||||
|
||||||
* | Comentariul autorului |
Comentariul lui:
04-07-2010 11:28:27
Data:
|
||||||
|
||||||
* | Comentariu | Voturi: | 5 Voteaza |
Link sponsorizat | |
Comentariul lui:
04-07-2010 17:26:30
Data:
|
||||||
|
||||||
* | Comentariu | Voturi: | 3 Voteaza |