Passing a variable into a div
Posted on 2015-01-30
I have some code, which looks something like this:
<a href="#" onclick="showHide('hidden_div2'); return false;">click here</a>
When this is clicked, a hidden div loads at the bottom of the page. The trouble is this link is generated from a mysql dataset, so it appears on every row. What i need to do is pass the $id variable, so the hidden div can be pre-populated with that rows data.
I suspect the link will need to contain something along the lines of <a href="mypage?ID=$row['ID'];"> - but how do I then get my hidden div to show?
Thanks in advance.