Page 1 of 1

php / mysql tree show find result

Posted: Mon Sep 10, 2007 11:32 pm
by eeau1973
hi .. i´m trying to show search result from a database ( of course using mysql), into a collapsed (tree ) menu way ...

i need to show the result like this (example)..

your results are:

Name: name_of_student
Age: Age_of_student

grades: (click here to expand), and when the user click here the other fields appear ...

French: grade_1
Music: grade_2
Mathematics: grade_3
Chemistry: grade_4

Thanks for any help !

the only thing that i have until now :( is the page that show the resuts using

Code: Select all

while ($row= mysql_fetch_array($result)) {
  $title = $row["1st_field"];

echo ("Field no1: "); print $row["fieldno1"]; print ("<p>");
echo ("Field no2 ");  print $row["field2"]; echo ("   "); print $row["Field no3"]; echo ("   ");  print $row["field3"]; print ("<p>");
...

Posted: Tue Sep 11, 2007 2:08 pm
by feyd
What part do you need help with?

help with php code

Posted: Tue Sep 11, 2007 2:13 pm
by eeau1973
Hi ...

I need help with the php code to show the results like this (example)..


your results are:

Name: name_of_student
Age: Age_of_student

grades: (when the user click here to expand the other fields appear ... )

French: grade_1
Music: grade_2
Mathematics: grade_3
Chemistry: grade_4



Thanks for any help !

Posted: Tue Sep 11, 2007 2:19 pm
by feyd
Assuming you don't want the page to refresh to show the extra data, PHP would have no control over this. It would be entirely client-side (Javascript.)