SlickCatSeven
asked on
PHP: Selected Checkboxes to MySQL DB Across 3 Web Pages in PHP
Newbie here. Is the following possible?
Page 1: has a form with multiple checkboxes. All checkboxes are named prop[] (for real estate property) so they can be handled as a single item on submission to Page 2.
Page 2: User can select an existing list of properties or name a new one to be created, then submit to Page 3.
Page 3: Creates a new list of properties with the selected checkboxes from Page 1, or appends to an existing property list, to be stored in a MySQL db.
I was thinking of making an array with the checked values on Page 2, but still need to pass the array to Page 3 on submission, or perhaps with session variable, then INSERT INTO MySQL db.
Mahalo for any help.
Page 1: has a form with multiple checkboxes. All checkboxes are named prop[] (for real estate property) so they can be handled as a single item on submission to Page 2.
Page 2: User can select an existing list of properties or name a new one to be created, then submit to Page 3.
Page 3: Creates a new list of properties with the selected checkboxes from Page 1, or appends to an existing property list, to be stored in a MySQL db.
I was thinking of making an array with the checked values on Page 2, but still need to pass the array to Page 3 on submission, or perhaps with session variable, then INSERT INTO MySQL db.
Mahalo for any help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you checked whats there in the prop[].
ASKER
Yup, it was a problem with prop[].
ASKER
Aloha!
ASKER
/*------------------------
$search_array = array();
for ($count = 0; $count <= count($_POST['prop[]']) - 1; $count++) {
if ($_POST['prop[]'][$count] <> '') {
$search_array = $_POST['prop[]'][$count];
}
}
$_SESSION['$search_array']
/*------------------------