Jump to content
N-Europe

Recommended Posts

Posted

So I've set up some code that adds say 3 fields to a database. I've used a while loop that will print each record to the screen. However...I want to be able to print just 1 field to the screen, and then be able to view the other 2 by clicking on that 1 field. Does anyone know how I'd go about doing this?

Posted

So what you're wanting something like this..

 

Text 1

on click

Text1a

Text1b

 

Text 2

on click

Text2a

Text2b

 

Where 'on click' is when you click on "Text 1" or "Text 2"

 

To make it just display the latest row in the database you put "LIMIT 1" at the end of your query.

I haven't done PHP for a while, I would need to write it out to get the other bit to work but I don't have time at the moment, sorry.

×
×
  • Create New...