php and html problem

Sorry for the vague subject line, didn’t know how to actually phrase this but here is my problem:

I have a query getting various amounts of data from the database (all title’s and description’s), this all works correctly but what i wanted to do was to set a session variable specific to the title. the reason being is because i wanted my index to be completely dynamic so when you click on something the main content changes but nothing is actually linking to anything, it’s all using session and variables to change the content due to what you click on.

For example it displays:
Title: Title1
Description: Description1

Title: Title2
Description: Description2

What I want to do is have it to where Title1 and Title2 will set a session variable to the specific title when a user clicks on it; say a user clicks on Title1 then the session variable will be “Title1”, and if they click on Title2 that same session variable will then equal “Title2”. When they click on any one title it will set the session variable and then reload the index.php file, any ideas on how to do this?

Sorry if I am still being vague on what I need help on.

Sponsor our Newsletter | Privacy Policy | Terms of Service