Jump to content

Check box (no code this time well not yet any way)


JasonBruce88

Recommended Posts

Hi I have hit a brick wall.

 

Basically I am trying to create a system which will end up with something similar to gocompare.com etc, where a quote is generated from the results of previous pages.

 

This is nearly all completed apart from one thing.

 

On one of the previous pages where criteria is gathered for the quote they can select the products they need quotes on from a few check boxes, with the option to select more than one.

 

My question is how can I add these multiple values from these selected check boxes to a cookie to use at a latter date.

 

I have read in other places to store these in a databse which they will be, if the quote is saved or taken further. I just need to be able to take these values across to another page to be used again.

 

Cheers 

 

 

Link to comment
Share on other sites

Hi I have hit a brick wall.

 

Basically I am trying to create a system which will end up with something similar to gocompare.com etc, where a quote is generated from the results of previous pages.

 

This is nearly all completed apart from one thing.

 

On one of the previous pages where criteria is gathered for the quote they can select the products they need quotes on from a few check boxes, with the option to select more than one.

 

My question is how can I add these multiple values from these selected check boxes to a cookie to use at a latter date.

 

I have read in other places to store these in a databse which they will be, if the quote is saved or taken further. I just need to be able to take these values across to another page to be used again.

 

Cheers 

 

 

 

Just store them in a session:

 

session_start();

$_SESSION['checkbox'] = $_POST['checkbox'];

 

And retrieve them in another page from that session

 

session_start();

$checkbox = $_SESSION['checkbox'];

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.