passing parameters between pages [SOLVED]

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
alaw
Forum Members
Forum Members
Posts: 44
Joined: Fri Apr 23, 2010 2:06 pm

passing parameters between pages [SOLVED]

Post by alaw »

I have a bunch of product pages. Each of these pages have a link to the contact page in them. If a website visitor clicks the contact page link, I would like to pass the product name as a parameter and pre-fill the contact page product field with this data. I was able to successfully pass the product name (such as: index.php?page=contact-us?product=Loader Coal Digging Buckets), but I have no idea how to extract this information on the contact page. Normally, Itried this: {php}echo($_GET['product']);{/php}, but that doesn't seem to work in this situation--it's not returning anything.

Thoughts?
Last edited by alaw on Sat Jan 15, 2011 1:09 am, edited 1 time in total.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: passing parameters between pages

Post by Nullig »

Have you tried:

index.php?page=contact-us&product='Loader Coal Digging Buckets'

Nullig
alaw
Forum Members
Forum Members
Posts: 44
Joined: Fri Apr 23, 2010 2:06 pm

Re: passing parameters between pages

Post by alaw »

Aha--syntax strikes again! Thank you for pointing that out--it is working now.
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Re: passing parameters between pages [SOLVED]

Post by psy »

Try {$smarty.get.product} to retrieve the $_GET var in the form.

hth
psy
Post Reply

Return to “Developers Discussion”