Categories > TinyButStrong general >

Collecting variables through url

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Gail
Date: 2004-11-27
Time: 04:03

Collecting variables through url

Sorry for asking what is probably a very simple thing for most of you but I can't wrap my brain around it.

I want to collect variables through the url, like mydomain.com/script.php?category=Something&subcategory=Somethingelse
then have it echo in the message1 and message2 fields so that they change depending on the url queries passed..
$message1 = 'Something' ;
$message1 = 'Somethingelse' ;

This what I have so far
include_once('tbs_class.php');
$TBS = new clsTinyButStrong ;
$TBS->LoadTemplate('template.html') ;
$message1 = 'Something' ;
$message2 = 'Somethingelse' ;
$TBS->Show() ;

I have the tags in the html correct and they will replace with whatever I manually type in the two message fields but I would like to make it dynamic depending on the link clicked and variables passed.

Thank you if you can help
By: Skrol29
Date: 2004-11-27
Time: 05:22

Re: Collecting variables through url

$message1 = $_GET['category'];
$message2 = $_GET['subcategory'];
It is case sensitive.
By: Gail
Date: 2004-11-27
Time: 05:33

Re: Collecting variables through url

That was the ticket.
I am very grateful for your fast help!


Thank you