[PHP/SQL]Creation de comtpe
Résolu/Fermé
kaham
Messages postés
180
Date d'inscription
lundi 22 octobre 2007
Statut
Membre
Dernière intervention
1 mars 2013
-
22 mai 2008 à 22:31
epsiloneIB Messages postés 133 Date d'inscription mardi 20 mai 2008 Statut Membre Dernière intervention 13 septembre 2009 - 24 mai 2008 à 20:01
epsiloneIB Messages postés 133 Date d'inscription mardi 20 mai 2008 Statut Membre Dernière intervention 13 septembre 2009 - 24 mai 2008 à 20:01
A voir également:
- [PHP/SQL]Creation de comtpe
- Creation compte gmail - Guide
- Creation de compte google - Guide
- Media creation tool - Télécharger - Systèmes d'exploitation
- Création site web - Guide
- Easy php - Télécharger - Divers Web & Internet
3 réponses
epsiloneIB
Messages postés
133
Date d'inscription
mardi 20 mai 2008
Statut
Membre
Dernière intervention
13 septembre 2009
8
22 mai 2008 à 22:57
22 mai 2008 à 22:57
Bonjour,
Regarde ce lien :
URL = http://participer.hostarea.org/Cours/Acces/Connexion.html
UTILISATEUR = cours
N TICKET = maconnexion
Ou encore, base toi sur ce code :
<?php
//RECUPERATION DES INPUTS SAISIS DANS NOTRE PAGE HTML
$login= $_POST['user'];
$pass= $_POST['password'];
//CONNEXION A LA BASE DE DONNEES
$connexion = mysql_connect('localhost', 'root', '') OR die('Erreur de connexion');
//SELECTION DE NOTRE BASE DE TRAVAIL
mysql_select_db('MaBase') OR die('Erreur de sélection de la base');
//REQUETE DE SELECTION DES CHAMPS DE NOTRE BASE SE DONNEES
$requete = mysql_query('SELECT C1_Utilisateur, C2_MotDePasse FROM MaTable') OR die('Erreur de la requête MySQL');
//DECONNEXION DE LA BASE DE DONNEES
mysql_close();
//RECUPERATION DES RESULTATS ET VERIFICATION
$i=0;
while($resultat = mysql_fetch_object($requete))
{
if (($login==$resultat->C1_Utilisateur)& ($pass==$resultat->C2_MotDePasse))
{$i=1;print "Connexion réussie, BRAVO!\n" ;exit;}
}
if ($i==0) {print "Echec de connexion!\n";}
?>
Bon courage!
Epsilone
Regarde ce lien :
URL = http://participer.hostarea.org/Cours/Acces/Connexion.html
UTILISATEUR = cours
N TICKET = maconnexion
Ou encore, base toi sur ce code :
<?php
//RECUPERATION DES INPUTS SAISIS DANS NOTRE PAGE HTML
$login= $_POST['user'];
$pass= $_POST['password'];
//CONNEXION A LA BASE DE DONNEES
$connexion = mysql_connect('localhost', 'root', '') OR die('Erreur de connexion');
//SELECTION DE NOTRE BASE DE TRAVAIL
mysql_select_db('MaBase') OR die('Erreur de sélection de la base');
//REQUETE DE SELECTION DES CHAMPS DE NOTRE BASE SE DONNEES
$requete = mysql_query('SELECT C1_Utilisateur, C2_MotDePasse FROM MaTable') OR die('Erreur de la requête MySQL');
//DECONNEXION DE LA BASE DE DONNEES
mysql_close();
//RECUPERATION DES RESULTATS ET VERIFICATION
$i=0;
while($resultat = mysql_fetch_object($requete))
{
if (($login==$resultat->C1_Utilisateur)& ($pass==$resultat->C2_MotDePasse))
{$i=1;print "Connexion réussie, BRAVO!\n" ;exit;}
}
if ($i==0) {print "Echec de connexion!\n";}
?>
Bon courage!
Epsilone
kaham
Messages postés
180
Date d'inscription
lundi 22 octobre 2007
Statut
Membre
Dernière intervention
1 mars 2013
5
24 mai 2008 à 00:06
24 mai 2008 à 00:06
ok merci, sa marche
epsiloneIB
Messages postés
133
Date d'inscription
mardi 20 mai 2008
Statut
Membre
Dernière intervention
13 septembre 2009
8
24 mai 2008 à 20:01
24 mai 2008 à 20:01
Bonjour,
Cool alors!
Epsilone
Cool alors!
Epsilone