Acces BDD localhost
steve-elipz
Messages postés
148
Date d'inscription
Statut
Membre
Dernière intervention
-
steve-elipz Messages postés 148 Date d'inscription Statut Membre Dernière intervention -
steve-elipz Messages postés 148 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
bonjour, j ai suivi un tuto livre d'or, ma BDD fonctionne parfaitement cepedant quand j envois mon index.php et config.php voila ce qu il se passe...
quelqu un sait il m aider afin d'enfin pouvoir utiliser mon local et non plus mon hebergeur svpppppppp
merci
(ps: j utilise wamp)
index.php:
config.php:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in /home/a3672331/public_html/index.php on line 4
Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'a3672331'@'localhost' (using password: NO) in /home/a3672331/public_html/index.php on line 5
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/a3672331/public_html/index.php on line 5
Warning: mysql_query() [function.mysql-query]: Access denied for user 'a3672331'@'localhost' (using password: NO) in /home/a3672331/public_html/index.php on line 6
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/a3672331/public_html/index.php on line 6
bonjour, j ai suivi un tuto livre d'or, ma BDD fonctionne parfaitement cepedant quand j envois mon index.php et config.php voila ce qu il se passe...
quelqu un sait il m aider afin d'enfin pouvoir utiliser mon local et non plus mon hebergeur svpppppppp
merci
(ps: j utilise wamp)
index.php:
<?php require "config.php"; mysql_connect(DB_SERVER,DB_LOGIN,DB_PASS); mysql_select_db(DB_NAME); mysql_query('SET NAMES '.DB_ENC); if(!empty($_POST)){ extract($_POST); $ip=$_SERVER["REMOTE_ADDR"]; $message=htmlentities($message); $sql="INSERT INTO lo_messages (pseudo,mail,message,ip) VALUES ('$pseudo','$email','$message','$ip')"; mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error()); } if(isset($_GET['suppr'])){ $sql="DELETE FROM lo_messages WHERE id={$_GET['suppr']}"; mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error()); echo "Message supprime"; } ?> <form method="post" action="index.php"> Nom :<input type="text" name="pseudo"/><br/> Mail :<input type="text" name="email"/><br /> Message : <br/> <textarea name="message"></textarea><br/> <input type="submit" value="envoyer"/> </form> <?php $sql="SELECT * FROM lo_messages"; $req= mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error()); while($data=mysql_fetch_assoc($req)){ echo "<strong>".$data["pseudo"]."</strong> "; echo '<a href="index.php?suppr='.$data["id"].'"> x </a><br />'; echo "<p>".$data["message"]."</p>"; } mysql_close(); ?>
config.php:
<?php define("DB_SERVER","localhost"); define("DB_NAME","livreor"); define("DB_LOGIN","root"); define("DB_PASS",""); define("DB_ENC","UTF8"); ?>
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in /home/a3672331/public_html/index.php on line 4
Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'a3672331'@'localhost' (using password: NO) in /home/a3672331/public_html/index.php on line 5
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/a3672331/public_html/index.php on line 5
Warning: mysql_query() [function.mysql-query]: Access denied for user 'a3672331'@'localhost' (using password: NO) in /home/a3672331/public_html/index.php on line 6
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/a3672331/public_html/index.php on line 6
A voir également:
- Acces BDD localhost
- Acces rapide - Guide
- Accès refusé - Guide
- Trousseau d'accès iphone - Guide
- Accès presse papier - Guide
- Je n'ai plus acces a ma boite mail gmail - Guide