Hello,

How to create a table with a sort feature. You can sort the table based on the header of the table. For example:

Name City Age

David Brazil 28
Vicky Spain 25
Ashley Spain 21

If you click the header=name it will be sort by name, else if you click the header=city it will be sort by city based else by age.

How to create a clickable header that could link to sql program?

Thanks in advance.

Member Avatar for iamthwee

Use datatables. Otherwise you could use jquery and an event handler find out what header was clicked then change the sql to do an order by 'header'

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.