mysql result location

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
jente
Forum Newbie
Posts: 9
Joined: Fri Nov 14, 2003 2:57 am

mysql result location

Post by jente »

Hi y'all,

My problem is the following:

I have created a todolist. So for every user, if logged in, the todo's are listed in a table (data source: mysql table). If a user clicks on a todotitle, the whole explanation of a todo apears under all todo's. Is it possible to make de explanation appear directly under the clicked todo? And how should I do that?

Thnx for every contribution :)
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

can you show us your current code?

We won't write complete new code for you

Mark
jente
Forum Newbie
Posts: 9
Joined: Fri Nov 14, 2003 2:57 am

Post by jente »

I'm not asking for new code... just a few guidelines :). Here a short presentation of my coding;

{ code that retrieves all todo from that user out of a mysqldatabase}


{if-code: if link is clicked, display detailed info about the clicked link }

I want to make appear the if-code directly under the clicked link, and I don't have a clue where to start. It would be marvelous if someone could give me a few hints.

Thnx in advance...

J.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

this is the outline how i would do it, i presume each row in your DB has a unique field like an id or something.

then, for easch link that is generated, add the id to the query string so your link would be like.

todo.php?id=somenumber

Code: Select all

// Retrieve results from the DB

// Iterate through each result, printing it to the browser

// If $_GET['id']= the id of the ToDo that you clicked, display extended info, otherwise, display next ToDo
Mark
Post Reply