Page de connexion à la base
This commit is contained in:
parent
e9876bb653
commit
fee1514fbf
25
www/mysql_inc.php
Normal file
25
www/mysql_inc.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$serveur_mysql = "localhost";
|
||||
$utilisateur_mysql = "root";
|
||||
$mot_de_passe_mysql = "";
|
||||
$nom_de_la_base = "graydon";
|
||||
|
||||
$connexion = mysql_connect($serveur_mysql, $utilisateur_mysql, $mot_de_passe_mysql);
|
||||
|
||||
if (!$connexion) {
|
||||
|
||||
print "La page ".$_SERVER['PHP_SELF']." a provoqué une erreur lors de sa tentative de connexion au serveur Mysql.";
|
||||
|
||||
die;
|
||||
}
|
||||
|
||||
$selection_de_la_base = mysql_select_db($nom_de_la_base, $connexion);
|
||||
|
||||
if (!$selection_de_la_base) {
|
||||
|
||||
print "Probleme de sélection de la base";
|
||||
|
||||
die;
|
||||
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue
Block a user