[snip] if ($update_type == update_Williams) { mysql_query("INSERT INTO events ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES (\'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", $sql4) or die ("could not do update"); } [/snip]
Try this if ($update_type == update_Williams) { mysql_query("INSERT INTO events (user, detaildesc, index, reference, date_added) VALUES ('" . $cookiewho . "', '" . $add_Williams . "', '', '" . $row_num . "', '" . $last_update . "')", $sql4) or die ("could not do update"); } First of all, seems there is extra stuff in the query that shouldn't be there (what is $sql4?) and you may have parentheses out of place. HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php