I have an html table which contains records, comes from mysql db. Each row also contains id (PK) wrt db table record.
Now I want to save record id in PHP Session variable, when I click on a row.
To do this I used onclick property for each row & call a javascript function with record id as function parameter & it works fine but how could I save this id in PHP Session variable ?
Thanks.
I have an html table which contains records, comes from mysql db. Each row
Share
That’s not possible because PHP is server-side language. However, you can use ajax for that.
Here is an ajax tutorial:
http://www.w3schools.com/Ajax/Default.Asp