Page 1 of 1

mysql result location

Posted: Thu Nov 20, 2003 7:52 am
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 :)

Posted: Thu Nov 20, 2003 8:31 am
by JayBird
can you show us your current code?

We won't write complete new code for you

Mark

Posted: Thu Nov 20, 2003 8:35 am
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.

Posted: Thu Nov 20, 2003 8:39 am
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