1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Document sans titre</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$A=$_GET["Code_PV"];
$base="test";
?>
<?php
//$sql = 'SELECT * from table_classe where Code_PV="$A"';
$connexion=mysql_connect("localhost", "root", "") or die("erreur de conexion".mysql_error());//*Connexion*à*MySQL*
mysql_select_db($base,$connexion) or die("erreur de selection".mysql_error());
//*Sélection*de la*base Test*
//*Combien*d'entrées*dans TABLE ?
//echo("$sql");
$reponse*=mysql_query(" SELECT * from te ");// or die('Erreur SQL !'.$sql.'<br>'.mysql_error());
?>
<?php
if($reponse==0)
{
echo "Exécution de la requête<br><br><b>impossible";
echo mysql_errno()." : ".mysql_error()."<br>";
}
else
echo "Bienvenue sur mon site <br>";
?>
<?php while ($val = mysql_fetch_array($reponse)){}
?>
<?php
mysql_close();* //*Déconnexion*de*MySQL
?>
</body>
</html> |
Partager