i have to update two different tables when submitting a form.
first one is a string containing all hotels information for each posted date
$index = 0;
$insert ="";
foreach($_POST['day'] as $index => $day) {
$day = $day;
$name = $_POST['name'][$index];
$sgl = $_POST['sgl'][$index];
$dbl = $_POST['dbl'][$index];
$nights = $_POST['nights'][$index];
$status = $_POST['status'][$index];
$ref = $_POST['ref'][$index];
$breakfast = $_POST['breakfast'][$index];
$meal = $_POST['meal'][$index];
$insert .= "$day|$name|$sgl|$dbl|$nights|$status|$ref|$breakfast|$meal;";
}
$data['details_accommodation'] = $insert;
This code works ok to update the first table.
i need then to isolate each $day (mysql date) and update a second year table with the same string where $day matches the corresponding date. and i'm stuck. hope i'm clear enough with mu problem !