php / mysql tree show find result

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eeau1973
Forum Commoner
Posts: 27
Joined: Sat Aug 19, 2006 4:49 pm

php / mysql tree show find result

Post 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>");
...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

What part do you need help with?
eeau1973
Forum Commoner
Posts: 27
Joined: Sat Aug 19, 2006 4:49 pm

help with php code

Post 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 !
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.)
Post Reply