joebudden Posted January 20, 2007 Share Posted January 20, 2007 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 eachEach item contains a link to another PHP page which displays the detailsThe 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 uncheckedIs it do with cookies or sessions?[code]<?phpif (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];?>"><?phpecho $r[$name].'<b> ';echo $r[$surname].'</b>';?></a>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/34965-cookies-and-check-boxes/ Share on other sites More sharing options...
scotmcc Posted January 20, 2007 Share Posted January 20, 2007 I have used this code to help me keep input on a page when a user navigates away and then comes back...[code]header("Cache-control: private"); //IE 6 Fix[/code]might help?Scot Quote Link to comment https://forums.phpfreaks.com/topic/34965-cookies-and-check-boxes/#findComment-164899 Share on other sites More sharing options...
joebudden Posted January 20, 2007 Author Share Posted January 20, 2007 nah didnt do anythin dude, im using mozilla firefox Quote Link to comment https://forums.phpfreaks.com/topic/34965-cookies-and-check-boxes/#findComment-164901 Share on other sites More sharing options...
Crimpage Posted January 20, 2007 Share Posted January 20, 2007 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... Quote Link to comment https://forums.phpfreaks.com/topic/34965-cookies-and-check-boxes/#findComment-164915 Share on other sites More sharing options...
joebudden Posted January 20, 2007 Author Share Posted January 20, 2007 hi, i tried putting <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="public"> in the head of my document but it didnt workAnyone else know a solution? Quote Link to comment https://forums.phpfreaks.com/topic/34965-cookies-and-check-boxes/#findComment-165023 Share on other sites More sharing options...
joebudden Posted January 20, 2007 Author Share Posted January 20, 2007 anyone??? Quote Link to comment https://forums.phpfreaks.com/topic/34965-cookies-and-check-boxes/#findComment-165064 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.