Re: Probaly a simple error! :D
| From: | Justin French | Date: | Fri, 23 Aug 2002 07:32:09 +0000 |
| Subject: | Re: Probaly a simple error! :D | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-113723@lists.php.net to get a copy of this message | ||
<A HREF="page.php?cat=77&sub=45&zzz=something_else">click</a>
These vars become available in page.php as either:
- $cat, $sub, $zzz if you have register_globals set to on in your php.ini
AND/OR
- $_GET['cat'], $_GET['sub'], $_GET['zzz'] in PHP > 4.1.1
You can then use these vars in stuff like MySQL queries:
$sql = "SELECT * FROM mytable WHERE category='{$_GET['cat']}'";
Justin French
on 23/08/02 4:59 PM, JohnP (aerc@aerc.biz) wrote:
> I need the user to be able to click on a main category into a subcategory -
> the following page needs to be able to decipher which link was clicked and
> then show the data accordingly - I have tried to do this using "like" id's in
> my tables but I'm not sure how to transfer to info from page to the next just
> using code within an <a href=""> tag - can anyone help me?