pourquoi ma page est blanche :- ( - PHP - Programmation
Marsh Posté le 26-05-2004 à 17:27:54
je n'ai aucune erreur mais rien ne s'affiche???? a comprend pas moi lolll :-) <html> <head> <title> Atelier PHP N°4 - testDb.php </title> <?php $db = mysql_connect("localhost","root","cocodirasta" ); function mysql_die($error = "inconnue" ) { echo "<H1>Erreur :". $error."</H1>"; exit; } mysql_select_db("projet",$db); $requete = "SELECT * FROM clients WHERE nom_cli='ASSTEC2' "; $result = mysql_query ($requete,$db); $article =mysql_fetch_object($result); mysql_free_result($result); ?> </head> <body> <?php echo $clients->num_cli ?> <BR> <?php echo $clients->nom_cli ?> <BR> <?php echo $clients->adr_cli ?> <BR> <?php echo $clients->ville_cli ?> <BR> <?php echo $clients->cp_cli ?> <BR> <?php echo $clients->num_tel_cli ?> </body> </html> ~ [quote]
Marsh Posté le 26-05-2004 à 17:52:21
remplace $clients-> par $article-> déjà
Marsh Posté le 26-05-2004 à 18:01:36
y en a qui créent de ces topics
Marsh Posté le 26-05-2004 à 19:29:05
lol
Marsh Posté le 26-05-2004 à 19:45:20
cocodirasta c'est ça ton mot de passe ?? lol
Marsh Posté le 26-05-2004 à 23:13:44
Make sure you enter the(*)required information where indicate.HTML code is not allowed
Marsh Posté le 26-05-2004 à 17:27:54
je n'ai aucune erreur mais rien ne s'affiche???? a comprend pas moi
lolll :-)
<html>
<head>
<title> Atelier PHP N°4 - testDb.php </title>
<?php
$db = mysql_connect("localhost","root","cocodirasta" );
function mysql_die($error = "inconnue" )
{
echo "<H1>Erreur :". $error."</H1>";
exit;
}
mysql_select_db("projet",$db);
$requete = "SELECT * FROM clients WHERE nom_cli='ASSTEC2' ";
$result = mysql_query ($requete,$db);
$article =mysql_fetch_object($result);
mysql_free_result($result);
?>
</head>
<body>
<?php echo $clients->num_cli ?>
<BR>
<?php echo $clients->nom_cli ?>
<BR>
<?php echo $clients->adr_cli ?>
<BR>
<?php echo $clients->ville_cli ?>
<BR>
<?php echo $clients->cp_cli ?>
<BR>
<?php echo $clients->num_tel_cli ?>
</body>
</html>
~
[quote]