You are here

function feedback_add_entry in Feedback 5.2

Same name and namespace in other branches
  1. 6.2 feedback.module \feedback_add_entry()

Store a new feedback entry in the database.

Parameters

string $message: A feedback message text entered by an user.

string $location: The path on which the feedback message was entered.

1 call to feedback_add_entry()
feedback_form_submit in ./feedback.module

File

./feedback.module, line 211
Allows site visitors and users to report issues about this site.

Code

function feedback_add_entry($message, $location) {
  global $user;
  $fid = db_next_id("{feedback}_fid");
  db_query("INSERT INTO {feedback} (fid, uid, message, location, location_masked, url, timestamp, useragent) VALUES (%d, %d, '%s', '%s', '%s', '%s', %d, '%s')", $fid, $user->uid, trim($message), $location, feedback_mask_path($location), url($location, NULL, NULL, TRUE), time(), $_SERVER['HTTP_USER_AGENT']);
}