salut a tous
j'ai fait un test sur une connexion local ca marche
mais a une connexion distante ca donne ce message d'erreur
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 2 in C:\wamp\www\Projet-personnel\basedistante.php on line 2
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\Projet-personnel\basedistante.php on line 7
je travaille avec wampserver 2.0
Voici le code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 <?php mysql_connect("sql102.0fees.net", "feesTa", "motpasse"); mysql_select_db("data"); $reponse = mysql_query("SELECT * FROM tab1"); while ($donnees = mysql_fetch_array($reponse) ) { ?> <p> <strong>User</strong> : <?php echo $donnees['id_user']; ?><br /> <strong>Mail</strong> : <?php echo $donnees['mail']; ?><br /> <strong>Date enregistrement :</strong> : <?php echo $donnees['date_enr']; ?><br /> </p> <?php } mysql_close();
Partager