Hi.
I am getting an error after my mysql UPDATE. It says:
An error occurred in script '/home/happenin/public_html/admin/edit_activity.php' on line 391: Uninitialized string offset: 1 Array ( [CONSOLE] => ...
I have no idea what is causing this. Any ideas?
Here is my code:
for($i = 0; $i < $drinks; $i++){
$dtype = $drink_type[$i];
$meas = $measure[$i];
$poun = $pounds[$i];
$penc = $pence[$i];
$sold = $sold[$i];
$query = "INSERT INTO activity_drink_type_assoc (activity_id, drink_type_id, measure_id, pounds, pence, sold) VALUES ('$aid', '$dtype', '$meas', '$poun', '$penc', '$sold')";
$result = mysql_query($query);
if(mysql_affected_rows() !=1){
echo 'There has been a system error. Please notify the administrator.';
echo mysql_error();
if(!empty($errors)){
foreach($errors as $msg){
echo '<p class="error">'.$msg.'</p>';
}
}
include('includes/footer.php');
exit();
}
}
Thanks
Chris