the part of the code i pasted in the first post works fine.
what i need though, is that when for example i click the second link, ‘resb’, it will open a new page, ‘showdetails1.php’, and in that page it should give the options
resb-1
resb-2
resb-3
and not
resa-1
resa-2
resa-3
resb-1
resb-2
resb-3
resc-1
resc-2
resc-3
as it is currently doing.
so i somehow need the showdetails1.php page to start with
$query="SELECT * FROM test WHERE id='2'";
instead of just
$query="SELECT * FROM test ";
where the id=part is generated by what is clicked in the previous page, resa, resb or resc.