while this seems like a way of doing it, id much rather format the information before it goes to the database rather than having to 'unserialize' it when retrieving from the db.
Im still totally stumped on this, i hope someone has some other ideas, ive managed to create the form with a nice loop and by putting the info into an array like this.
Just to reiterate, i have a form that is created by looping through and using this type of thing.
for($today=1;$today<=$days;$today++){
<input type="text" name="array['.$today.'][m_total]" value="">
}
then the review form page
foreach ($_POST['array'] as $key => $value){
<input type="hidden" name="array['.$key.'][m_total]" value="'.$value['m_total'].'">'.$value['m_total'].'
}
which if they click ok would write the info to the database.
but dont know how to then retrieve the info to store to my db.
surely there must be a way?
Below is how i would do it but it doesnt work.
for($today=1;$today<=$totaldays;$today++){
$sql99 = mysql_query("INSERT INTO earnings (m_venue_name, m_employee, m_total, thisday,totaldays,location,hours,promotion,paxcount,youthcount,stcount,mtcount,ltcount,xltcount,gtcount,m_comments,cruisenumber,m_date)
VALUES('$venue', '$name', '".$today."m_total', '$today','$totaldays','".$today."location','".$today."hours','$".$today."promotion','$paxcount','$youthcount','".$today."stcount','".$today."mtcount','0','".$today."xltcount','".$today."gtcount','".$today."m_comments','$cruisenumber', '$date')") or die (mysql_error());
}