Forum Moderators: coopster

Message Too Old, No Replies

when links clicked, output should load on the same page

link php

         

ksugam

9:14 pm on Jan 15, 2008 (gmt 0)

10+ Year Member



Hello all,
i have a mysql table with 3 fields: date (format:yyyy/mm/dd), data 1, data 2, data 3

i am displaying the output using php as:
fields¦jan07¦feb07¦mar07 .. .......
data1 ¦ 10 ¦22 ¦34
data2 ¦ 11 ¦29 ¦45
data3 ¦ 34 ¦30 ¦40

now i want to put three links on top of the page as
display data: Quarterly, Monthly, Yearly. i want these 3 options to be clickable. for e.g., once the user clicks on "Quarterly", the above output should be replaced by quarterly data on the same page.

How can i do this?

Thanks,
Sugam

PHP_Chimp

10:20 pm on Jan 15, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



e.g., once the user clicks on "Quarterly", the above output should be replaced by quarterly data on the same page.

If you want the page to only reload the appropriate parts, and not completely reload then you will need to look at ajax. So that you can communicate with the server to ask for new content, then put that new content on the original page.