Query for a Drop List don't echo out !

I am trying to make the query work in my php script ,that allow me to echo all speciality related to the user sing in,but it doesn’t give me nothing this is my query : there’s Table"affecte" tha has a link between Table"enseignat" and “groupe” and in Table “groupe” there’s link to Table “speciality” this images of every table

like you see in the script and every time I click on the list it don’t give me nothing first of all I’ve tried this one:
[php]



    – Select Speciality –
    <?php
            $getallSpeciality = mysql_query("select Nom_Specialite from specialite where enseignant.Id_enseignant=''+mail+'''   and enseignant.`Id_Enseignant`=affecte.`Id_Enseignant` and affecte.`Id_Groupe`=groupe.`Id_Groupe` and specialite.`Id_Specialite`=groupe.`Id_Specialite`;");
            while($viewallSpeciality = mysql_fetch_array($getallSpeciality)){
            ?>
            <option id="<?php echo $viewallSpeciality['Id_Specialite']; ?>">
            <?php echo $viewallSpeciality['Nom_specialite'] ?></option>
            <?php } ?>
      </select>
    </ul>[/php]

select Nom_Specialite from specialite,enseignant,affecte,groupe where enseignant.mail_enseignant=’’+mail+’’’ and enseignant.Id_Enseignant=affecte.Id_Enseignant and affecte.Id_Groupe=groupe.Id_Groupe and specialite.Id_Specialite=groupe.Id_Specialite;
UPDATE evaluation SET Td=‘11’ WHERE Matricule=‘1’


www2.0zz0.com/2014/04/28/01/793102561.jpg
www2.0zz0.com/2014/04/28/01/324938650.jpg
i want to displaye speciality that linked to enseignant ! ,and if tried SELECT * FROM specialite it giving all the speciality ,but what I am trying to do is to echo for every enseignant “user” his speciality ,my login.php is in a separate file and this code is from my note-on.php ,I will very grateful for any help thanks in advance !

I answered this for you on the phpfreaks forum.

can u give me the link thanks !

Really! YOU posted it on the other forum and you’re asking me to give you a link to it, that makes absolutely no sense.
http://forums.phpfreaks.com/topic/288077-query-for-a-drop-list-dont-echo-out/

i am so sorry i didn’t meant too!

Sponsor our Newsletter | Privacy Policy | Terms of Service