Page 1 of 1
show hide block of code/records
Posted: Mon Jun 06, 2005 7:50 am
by warren
hi all hope you can helf me.basically i would like to hide show some database rows not on the first page but only if the person clicks on a url does it show the rows all this is done on one single php page. is there a way of doing this?
regards warren
Posted: Mon Jun 06, 2005 8:44 am
by MathewByrne
There are a lot of different ways of doing this.
An easy way would be using $_REQUEST variables in the URL, your hyperlink would look like:
Code: Select all
<a href="e;http://www.yourdomain.com/page.php?show=1"e;>Link</a>
Then all you need to do is check in your script for the presence of this variable:
Code: Select all
if($_REQUEST["show"] == 1) {
// show all rows
}
else {
// only show some rows
}
Posted: Mon Jun 06, 2005 10:08 am
by warren
you are a frekin genius thanks it worked berry well
regards
Warren Grant