|
La Communauté Webmaster 
| Pages: [1] |
 |
|
|
|
Auteur |
Sujet: probleme d'encodage (Lu 778 fois) |
|
 |
probleme d'encodage
« sur: le 04-11-2010 a 18:54:18 » |
|
oliv56640
Membre récent

Hors-Ligne
Messages: 3

|
Bojour à tous,
voilà mon pb,
j'ai testé ma requête sur phpmyadmin et elle fonctionne.
Le soucis es qu'une fois sur le site le résultat escompté n'est plus le bon .
Voilà le code:
<?php
include('global/haut.php');
include('global/entete.php');
include('global/menus.php');
if(isset($_SESSION['ident'])) {
?> <!-- Le corps --> <div id="corps">
<fieldset>
<?php echo 'Bonjour ' . $_SESSION['ident']; ?> bienvenue sur votre espace abonné <br />
<?php if (isset($_POST['mot_de_passe']) AND $_POST['mot_de_passe'] == "k" OR $_POST['mot_de_passe'] == "a") // Si le mot de passe est bon { // On affiche les codes ?>
<?php try { $bdd = new PDO('mysql:host=localhost;dbname=sport', 'root', ''); } catch(Exception $e) { die('Erreur : '.$e->getMessage()); } $reponse = $bdd->prepare('SELECT * FROM demande WHERE ident = ?'); $reponse->execute(array($_GET['ident'])); $donnees = $reponse->fetch();
?>
<?php $reponse = $bdd->prepare('SELECT COUNT(*) AS nb_diplome FROM demande where diplome = :diplome and diplome1 = :diplome1 and dpt = :dpt and date_dp >= :date_dp and date_fp <= :date_fp and heure_lud >= :heure_lud and heure_luf <= :heure_luf and heure_mad >= :heure_mad and heure_maf <= :heure_maf and heure_med >= :heure_med and heure_mef <= :heure_mef and heure_jed >= :heure_jed and heure_jef <= :heure_jef and heure_ved >= :heure_ved and heure_vef <= :heure_vef and heure_sad >= :heure_sad and heure_saf <= :heure_saf and heure_did >= :heure_did and heure_dif <= :heure_dif' ); $reponse->execute(array(':diplome' => $donnees['diplome'], ':diplome1' => $donnees['diplome1'], ':dpt' => $donnees['dpt'], ':date_dp' => $donnees['date_dp'], ':date_fp' => $donnees['date_fp'], ':heure_lud' => $donnees['heure_lud'], ':heure_luf' => $donnees['heure_luf'], ':heure_mad' => $donnees['heure_mad'], ':heure_maf' => $donnees['heure_maf'], ':heure_med' => $donnees['heure_med'], ':heure_mef' => $donnees['heure_mef'], ':heure_jed' => $donnees['heure_jed'], ':heure_jef' => $donnees['heure_jef'], ':heure_ved' => $donnees['heure_ved'], ':heure_vef' => $donnees['heure_vef'], ':heure_sad' => $donnees['heure_sad'], ':heure_saf' => $donnees['heure_saf'], ':heure_did' => $donnees['heure_did'], ':heure_dif' => $donnees['heure_dif'] ) );
$donnees = $reponse->fetch(); echo $donnees['nb_diplome'];
$reponse->closeCursor();
?> candidats correspondent à vos attentes. <br /> Voici la liste et les coordonnées des candidats selectionnés :
<?php
$reponse = $bdd->prepare("select b.* from bees b join (select cand.idbees from demande cand, demande client where client.ident !='' and client.ident = :ident and cand.idbees !='' and client.diplome = cand.diplome and client.diplome1 = cand.diplome1 and client.dpt = cand.dpt and cand.date_dp <= client.date_dp and cand.date_fp >= client.date_fp and cand.heure_lud <= client.heure_lud and cand.heure_luf <= client.heure_luf and cand.heure_mad <= client.heure_mad and cand.heure_maf >= client.heure_maf and cand.heure_med <= client.heure_med and cand.heure_maf >= client.heure_maf and cand.heure_jed <= client.heure_jed and cand.heure_jef >= client.heure_jef and cand.heure_ved <= client.heure_ved and cand.heure_vef >= client.heure_vef and cand.heure_sad <= client.heure_sad and cand.heure_saf >= client.heure_saf and cand.heure_did <= client.heure_did and cand.heure_dif >= client.heure_dif) t on t.idbees = b.idbees"); $reponse->execute(array(':ident' =>$_SESSION['ident']));
while ($donnees = $reponse->fetch()) { ?> <p> <?php echo $donnees['civ']; ?> <?php echo $donnees['nom']; ?> <?php echo $donnees['prenom']; ?><br /> Coordonnées :<br /><?php echo $donnees['adresse']; ?> <?php echo $donnees['cplt_adresse']; ?> <?php echo $donnees['code_postal']; ?> <?php echo $donnees['ville']; ?><br /> telephone 1: <?php echo $donnees['fixe']; ?> <br />telephone 2 : <?php echo $donnees['gsm']; ?> <br /> email :<?php echo $donnees['email']; ?> </p> <?php }
$reponse->closeCursor();
?>
</fieldset> <?php } else // Sinon, on affiche un message d'erreur { echo '<p>Mot de passe incorrect</p>'; } ?>
</div>
<br />
<?php } else echo '<p>Vous n\'êtes pas connecté(e).</p>'; ?> <?php include("global/pdp.php"); ?>
</html>
|
|
lorsque je remplace dans la premiere requete ident par idbees j'ai l'erreur suivante :
Notice: Undefined index: idbees in C:\wamp\www\SBEv8111010\abonnementcl.php on line 39
|
|
qui peux m'aider |
|
|
|
|
|
|
 |
Re:probleme d'encodage
« Répondre #1 sur: le 04-11-2010 a 20:54:48 » |
|
|
|
|
 |
Re:probleme d'encodage
« Répondre #2 sur: le 05-11-2010 a 11:04:19 » |
|
|
|
|
 |
Re:probleme d'encodage
« Répondre #3 sur: le 11-11-2010 a 22:22:52 » |
|
|
|
|
 |
Re:probleme d'encodage
« Répondre #4 sur: le 12-11-2010 a 10:44:15 » |
|
|
|
|
| Pages:
[1] |
|
|
|
| |
|
|