function contact_cookie_save in Contact 6.2
2 calls to contact_cookie_save()
- contact_mail_page_submit in ./
contact.pages.inc - Form submission handler for contact_mail_page().
- contact_mail_user_submit in ./
contact.pages.inc - Form submission handler for contact_mail_user().
File
- ./
contact.module, line 253 - Enables the use of personal and site-wide contact forms.
Code
function contact_cookie_save(array $values, array $fields = array(
'name',
'mail',
'homepage',
)) {
$time = time();
foreach ($fields as $field) {
if (isset($values[$field])) {
// Set cookie for 365 days.
setrawcookie('Drupal.visitor.' . $field, rawurlencode($values[$field]), $time + 31536000, '/');
}
}
}