session variable through checkbox without POST

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
patfee
Forum Newbie
Posts: 2
Joined: Thu Aug 21, 2008 2:17 am

session variable through checkbox without POST

Post by patfee »

Hi,
i completely lost on how i could establish the following

On page1.php i would like to have a couple of checkboxes
the checkbox values should initially be storred within a session variable (array)
when the checkbox status changes, these session variable should be updated.

i would like to avoid the "post" method.

many thanks for your advise!

rgds
Patrick
sirish
Forum Newbie
Posts: 8
Joined: Tue Sep 09, 2008 11:45 pm

Re: session variable through checkbox without POST

Post by sirish »

Do you want to change the value of session variable when the check box is clicked without posting the form? If yes then u can use ajax. You can call ajax page and on click event of the check box and change the value of session variable on that ajax page.
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: session variable through checkbox without POST

Post by aceconcepts »

or you could use javascript.
sirish
Forum Newbie
Posts: 8
Joined: Tue Sep 09, 2008 11:45 pm

Re: session variable through checkbox without POST

Post by sirish »

aceconcepts wrote:or you could use javascript.
But how will you change the value of session variable thru javascript
Post Reply