OK, here is an absolutely basic, barebones example.
It isnt secure nor is it clever!
PHP Code:
<?php
session_start();
if(isset($_POST['form_id'])) {
/* simplified
** */
$str = '';
foreach($_POST as $key=>$data) {
if(($key != 'submit') && ($key != 'form_id')) {
$str .= $data. ',';
}
}
$_SESSION['basketo'][] = rtrim($str, ',');
print_r($_SESSION['basketo']);
}
?>
<form name="testForm" id="testForm" action="" method="post">
<div class="imageHolder">
[Your Image]
</div>
Quantity: <input type="text" name="quantity" />
<input type="hidden" name="photo_id" value="1" />
<input type="hidden" name="dims" value="16x4" />
<button type="submit" name="submit" value="submit">Submit</button>
<input type="hidden" name="form_id" value="addPhoto" />
</form>
But it should give you the principle.
Each time the form is submitted it adds the info in a comma delimited list - Quantity, ID and Dimensions.
If you want me to put it into something more functional - just ask
Bookmarks