par
ghostrider » 05 oct. 2010, 23:29
Bonsoir,
comme dit précédemment, j'ai toujours un pb pour ma connexion php sur une bdd phpmyadmin:
voici mon fichier html ou lorsque je remplit le champ et que je clique sur envoyer, c'est cencé s'inscrire sur ma BDD.
<html>
<head>
<title> exercice 8 page html bookmark </title>
</head>
<body>
<form method="POST" action="ex8.php">
saisir test
<input type="text" name="test">
<input type="submit" value="envoyer">
</form>
<body>
</html>
et voici mon fichier.php
html>
<head>
<title> exercice 8 </title>
<head>
<body>
<?php
//connection serveur bdd
$connect_db=mysql_connect("127.0.0.1","root","");
$bdd_db=bookmark;
mysql_select_db($bdd_db,$connect_db);
mysql_query("CREATE TABLE bookmark(pk int primary key);");
mysql_close($connect_db);
?>
</body>
</html>
l'erreur est la suivant lorsque je fait envoyer:
Notice: Use of undefined constant bookmark - assumed 'bookmark' in C:\wamp\www\ex8.php on line 10
Bonsoir,
comme dit précédemment, j'ai toujours un pb pour ma connexion php sur une bdd phpmyadmin:
voici mon fichier html ou lorsque je remplit le champ et que je clique sur envoyer, c'est cencé s'inscrire sur ma BDD.
<html>
<head>
<title> exercice 8 page html bookmark </title>
</head>
<body>
<form method="POST" action="ex8.php">
saisir test
<input type="text" name="test">
<input type="submit" value="envoyer">
</form>
<body>
</html>
et voici mon fichier.php
html>
<head>
<title> exercice 8 </title>
<head>
<body>
<?php
//connection serveur bdd
$connect_db=mysql_connect("127.0.0.1","root","");
$bdd_db=bookmark;
mysql_select_db($bdd_db,$connect_db);
mysql_query("CREATE TABLE bookmark(pk int primary key);");
mysql_close($connect_db);
?>
</body>
</html>
l'erreur est la suivant lorsque je fait envoyer:
[b]Notice: Use of undefined constant bookmark - assumed 'bookmark' in C:\wamp\www\ex8.php on line 10[/b]