} } } } } $add_fields[$key] = $value; } } if (function_exists('db_view_add_record')) { $add_fields = db_view_add_record($add_fields); if (is_string($add_fields)) { $update_error_message = $add_fields; } } if (!$update_error_message) { mysql_add_record($mysql_connect_id, $table_name, $add_fields); $error_message = mysql_error($mysql_connect_id); if ($error_message) { print "MyQSL Error: {$error_message}"; exit; } if ($add_fields[$primary_key_field]) { $record_id = $add_fields[$primary_key_field]; } else { $record_id = mysql_insert_id($mysql_connect_id); } if ($FORM['submit'] == "Add and Duplicate") { $FORM['return_query_mark'] = htmlentities(urlencode($FORM['return_query'])); header("Location: {$_SERVER['PHP_SELF']}?f=add&pri={$record_id}&return_query=" . $FORM['return_query_mark']); } else { if ($FORM['submit'] == "Add and New") {
function mysql_add_records_old($connect_id, $table, $record_array, $quick_insert = 0) { foreach ($record_array as $record) { $return_value = mysql_add_record($connect_id, $table, $record, $quick_insert); } return $return_value; }