Now, I have a search page, that returns mysql query like so :
while($row=mysqli_fetch_array($result))
{
echo "<a onclick='function1();function2();function3()'>",$row['compn'],"</a>";
echo "<form><input type='text' id='tester' value='",$row['compuid'],"' hidden='hidden'></input></form>";
}
Nothing on my page opens a new page or loads a new one. Everything basically resides on the same page. The results are displayed in another overlay :
<a onclick="function1();function2();function3()"></a>
<form><input id="tester" type="text" hidden="hidden" value="abcdefg"></input></form>
<a onclick="function1();function2();function3()"></a>
<form><input id="tester" type="text" hidden="hidden" value="mnopqrs"></input></form>
As you can see above, it kind of works BUT not like I want it to be : If clicked on the top "link", it will load id="tester" into document.getElementById("tester").value; and then display abcdefg. If I click on the bottom link, it will again load tester and display abcdefg. HOW do I get the code or the php to load a dynamic attribute or something, so that if I click the below link, it will actually display mnopqrs ? Note: When a result link is clicked, it should display more details on an overlay by reading off from the php. For example : link 1 = Peter, LAW link 2 = Kate, JOURNALISM (click on link 1:) Peter, BIO : Peter has been studying LAW for more than 2 years, Peter was born on 24/05/1992. Picture of Peter (click on link 2:) Kate, BIO : Kate has been studying ...