prepare('INSERT INTO blog_messages (messages_id_expediteur,messages_id_destinataire,messages_date,messages_titre,messages_message) VALUES (:messages_id_expediteur,:messages_id_destinataire,:messages_date,:messages_titre,:messages_message)');
$stmt->execute(array(
':messages_id_expediteur' => html($_SESSION['userid']),
':messages_id_destinataire' => html($_POST['destinataire']),
':messages_date' => date("Y-m-d H:i:s"),
':messages_titre' => html($_POST['titre']),
':messages_message' => html($_POST['message'])
));
header('Location: '.SITEURL.'/admin/messagerie.php?membre='.html($_SESSION['username']).'&message=ok');
$stmt->closeCursor();
exit();
}
}
?>
prepare('SELECT username as nom_destinataire, memberID as id_destinataire FROM blog_members WHERE memberID <> :session AND memberID != 32 ORDER BY username ASC');
$desti->bindValue(':session', $_SESSION['userid'], PDO::PARAM_INT);
$desti->execute();
?>