Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-31-2004, 07:09 PM   PM User | #1
AshleyQuick
Regular Coder

 
Join Date: Jun 2002
Location: USA
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
AshleyQuick is an unknown quantity at this point
If coming from a specified page, then place check in checkbox

Is this possible using php? I have a contact form that allows users to request info for four different products, each of which have a checkbox so that the user can get info on product 1 only, or products 3 and 4, you get the point..

How is it possible to populate the checkbox for product one on the request page, for instance, if they were on the product one details page. Does this make sense?

Here's one of the checkbox inputs if that helps:

<input class="prodchex" type="checkbox" name="01" value="candles">

Thanks,

Ash
AshleyQuick is offline   Reply With Quote
Old 03-31-2004, 07:17 PM   PM User | #2
sidney
Regular Coder

 
Join Date: Mar 2004
Posts: 115
Thanks: 0
Thanked 0 Times in 0 Posts
sidney is an unknown quantity at this point
<input class="prodchex" type="checkbox" name="01" value="candles" <?php
if($_SERVER['HTTP_REFERER']=="http://www,domain.com/page.ext")
{
echo" checked";
}
?> >
sidney is offline   Reply With Quote
Old 03-31-2004, 07:50 PM   PM User | #3
AshleyQuick
Regular Coder

 
Join Date: Jun 2002
Location: USA
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
AshleyQuick is an unknown quantity at this point
Like a charm, thanks!!
AshleyQuick is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:40 AM.


Advertisement
Log in to turn off these ads.