par moumous » 25 mars 2011, 00:17
par Truc » 17 mars 2010, 12:22
par stealth35 » 17 mars 2010, 01:23
par Jip Jip Jip » 16 mars 2010, 20:00
par stealth35 » 16 mars 2010, 19:39
par Jip Jip Jip » 16 mars 2010, 19:37
<?php include("connexion.php"); //include("fonctions.php"); $q = "SELECT id_stagiaires, nom, prenom, poste, sexe, statut, naissance FROM stagiaires ORDER BY nom"; // echo $q; $p = mysql_query($q) or die (mysql_error()); while ($row = mysql_fetch_assoc($p)) { $id[] = $row["id_stagiaires"]; $nom[] = $row["nom"]; $prenom[] = $row["prenom"]; $poste[] = $row["poste"]; $statut[] = $row["statut"]; $naissance[] = $row["naissance"]; $sexe[] = $row["sexe"]; } $nbtotal = count($id); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Liste des salariés</title> <style type="text/css"> <!-- .Style1 { font-size: 36px; font-weight: bold; font-style: italic; } --> </style> <style type="text/css"> <!-- .Style1 { font-size: 36px; font-weight: bold; font-style: italic; } --> </style> <link href="style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .Style2 {font-size: 24px} .Style7 { font-size: 14px; font-family: Arial, Helvetica, sans-serif; } .Style15 {color: #003579} .Style17 { font-size: 11px; font-style: italic; color: #000000; font-weight: bold; } .Style19 {font-size: 18px; font-weight: bold; color: #7E86B7; } .Style21 {font-size: 11px} .Style49 { font-family: Arial, Helvetica, sans-serif; font-size: 9px; font-weight: bold; color: #000099; } --> </style> </head> <body><br> <table align="left"><tr><td><a href="/salaries/index.htm"><img src="data/accueil.png" width="40" border="0"></a></td><td><span class="Style49">ACCUEIL</span></td> </tr></table> <table align="right"><tr><td><a href="javascript:history.back();"><img src="data/precedent.png" width="40" border="0"></td><td><span class="Style49">PREC.</span></td> </tr></table> <table width="30%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td><div align="center"><span class="Style1 Style2 Style2"><span class="Style7">Liste des salariés </span></span></div></td> </tr> <tr> <td><div align="center"><span class="Style1 Style2 Style2"><img border="0" src="data/lignes026.gif" width="115" height="2"></span></div></td> </tr> </table><br><br> <center><table width="80%" border="0" cellspacing="0" cellpadding="0"> <?php for ($i=0;$i<$nbtotal;$i++) { ?> <tr> <td width="20"> <div align="right"> <img src="data/<? echo $sexe[$i]?>.jpg" width="50" height="50" align="top" alt="Homme/Femme"><br> </div></td> <td> <div align="right"><table id="<? echo $numero; ?>" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><br><span class="Style15"><?php echo $nom[$i];?> <?php echo $prenom[$i];?></span> <br><span class="Style17"> <?php echo $poste[$i]; ?> <span class="Style19">/</span> <?php echo $statut[$i];?> <span class="Style19">/</span> <?php echo $naissance[$i];?> </span> <hr color="003579" size="1"> <span class="Style17"> </span></td> <td width="30"><a href="salaries_voir.php?id_salaries=<?php echo $id[$i];?>"><img src="data/loupe.png" align="bottom" border="0" alt="Voir la fiche complète du salarié"></a></td> </tr> </table> </div> </td> <td> </td> </tr> <?php } ?> </table> </center> </body> </html>
<? $srv = "localhost"; $log = "root"; $pwd= ""; $base = "gestion_presence"; echo "coucou"; $connect=mysql_connect($srv,$log,$pwd) or die ("connexion echoué"); mysql_select_db($base,$connect) or die ("connexion a la base echoué"); ?>
par stealth35 » 16 mars 2010, 19:18
par Jip Jip Jip » 16 mars 2010, 19:15
Code : Tout sélectionner
Warning: mysql_query() [function.mysql-query]: Accès refusé pour l'utilisateur: 'JP'@'@localhost' (mot de passe: NON) in C:\Program Files\EasyPHP-5.3.2\www\gestion_presence\stagiaires_liste.php on line 10 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\Program Files\EasyPHP-5.3.2\www\gestion_presence\stagiaires_liste.php on line 10 Accès refusé pour l'utilisateur: 'JP'@'@localhost' (mot de passe: NON)
"coucou";
par stealth35 » 16 mars 2010, 19:09
<?php include("connexion.php"); //include("fonctions.php"); $req = mysql_query('avec une requête suivant ta table') or exit(mysql_error());
par Jip Jip Jip » 16 mars 2010, 18:58
<? $srv = "localhost"; $log = "root"; $pwd= ""; $base = "gestion_presence"; $connect=mysql_connect($srv,$log,$pwd) or die ("connexion echoué"); mysql_select_db($base,$connect) or die ("connexion a la base echoué"); ?>
<?php include("connexion.php"); //include("fonctions.php"); ?> <?php
par stealth35 » 16 mars 2010, 18:47
par Jip Jip Jip » 16 mars 2010, 18:46
par stealth35 » 16 mars 2010, 18:43
par Jip Jip Jip » 16 mars 2010, 18:34
par Jip Jip Jip » 16 mars 2010, 18:33
$srv = "localhost"; $log = "root"; $pwd= ""; $base = "gestion_presence"; function connexion($srv,$log,$pwd,$nom_base) { $connect=mysql_connect($srv,$log,$pwd) or die ("connexion echoué"); mysql_select_db($base,$connect) or die ("connexion a la base echoué"); }
include("config.php"); //include("fonctions.php"); connexion();
Fatal error: Call to undefined function connexion() in C:\Program Files\EasyPHP-5.3.2\www\gestion_presence\stagiaires_liste.php on line 5