I'm trying to store an array of checkbox values into a session array, sort of like a shopping cart, but I can't figure out how to not overwrite the sessions array each time new checkbox values are added to the stored session...
Here is an array that is created upon submitting with two checkboxes checked:
Code: Array
(
[0] => 606613
[1] => 606614
)
And then my sessions array is now like so:
Code: Array
(
[checked] => Array
(
[0] => 606613
[1] => 606614
)
)
The code for that so far is this:
<?php
if (!isset($_SESSION['checked'])) {
$_SESSION['checked'] = array();
}
$_SESSION['checked'] = $_GET['new_checked'];
?>
I know I probably need to add a loop that checks the arrays, but I just can't think how I should go about adding newly checked checkbox values, that are not duplicates, to the *end* of the session array "checked"??
Would anybody care to share some ideas?
need help with date function
i have following form for dateCode: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
script and html conflict in trying to create a header.
I have an error is occurring because of an html webpage with a "php require" at the top of the page calling a script. Somehow I'm having a problem with the html page and the script both
Certain files upload, while others do not
I want to read the data from an uploaded file. Not sure why, but it only uploads for certain files. Not sure if it has to do with the size or what. Even when I comment all of the if and else
Must be a string? Huh, what? HELP?
with the following script, I get Fatal error: Property name must be a string in /home/content/e/s/o/esone/html/test/123.php on line 24Anyone maybe know what is causing it?Code: <?phpfunction
Does deleting the spmlog directory critical?
Hi Everyone,
unoconv doc convert to pdf code prob
PHP/5.3.1 Hi. I am trying to use this code to convert docs to .pdf utilizing unoconv. However the page just freezes blank, with no php errors reported. All permissions to folders are set 777. Can
PL/SQL: ORA-00947: not enough values error message
Hi all i am getting Error(25,63): PL/SQL: ORA-00947: not enough values error message when executing following insert statement. I am new to Oracle SPs, so could someone help me to solve the issue.
Code clarification
Hi In the following code what could be the "search_print()" and where it could be placed.Couldn't find within the page or included pagesCode: [Select]<td align="right"
Syntax error
hi im having a little trobble with this script --------------------------------------------------------------------------------------------error
Share admin accross websites
I'm using .net memberships and roles in one of my sites, but I need to be able to share logins and passwords for admins accross multiple sites that use a custom database for security. How would I go