Jump to content

Recommended Posts

hi, does any happen to know anything about checkboxes and cookies???

i've got a list of items in a table with a  check box next to each

Each item contains a link to another PHP page which displays the details

The problem i am having is that when i check a few items, click the link to display details, when i return to the list the boxes are unchecked

Is it do with cookies or sessions?

[code]
<?php
if (mysql_num_rows($allplayers) !== 0)
{
while($r = mysql_fetch_assoc($allplayers))
{
echo '<tr><td align="left">';
echo '<input type="checkbox" name="add_players[]" value="'.$r[$id].'" /></td>';
?>
<td><a href="information.php?id=<?php echo $r[$id];?>">
<?php
echo $r[$name].'<b> ';
echo $r[$surname].'</b>';
?>
</a>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/34965-cookies-and-check-boxes/
Share on other sites

what html meta tags are you using? Do you have the Cache-Control one set? I think that will cause that by stopping the browser from remembering what was set so every time it loads the page, it just loads it blank like it was the first time you have been there...
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.