forked from science-ation/science-ation
contact page database is done
This commit is contained in:
parent
08e867c9c6
commit
df60806905
@ -39,9 +39,8 @@ if (get_value_from_array($_POST, 'action') == 'send') {
|
|||||||
if (isEmailAddress(get_value_from_array($_POST, 'fromemail'))) {
|
if (isEmailAddress(get_value_from_array($_POST, 'fromemail'))) {
|
||||||
list($id, $md5email) = explode(':', $_POST['to']);
|
list($id, $md5email) = explode(':', $_POST['to']);
|
||||||
|
|
||||||
$q = $pdo->prepare('SELECT * FROM users WHERE uid=.?. ORDER BY year DESC LIMIT 1');
|
$q = $pdo->prepare('SELECT * FROM users WHERE uid=? ORDER BY year DESC LIMIT 1');
|
||||||
$q->bindParam(1, $id);
|
$q->execute([$id]);
|
||||||
$q->execute();
|
|
||||||
// if a valid selection is made from the list, then this will always match.
|
// if a valid selection is made from the list, then this will always match.
|
||||||
if ($md5email == md5($r->email)) {
|
if ($md5email == md5($r->email)) {
|
||||||
$from = cleanify($_POST['from']) . ' <' . cleanify($_POST['fromemail']) . '>';
|
$from = cleanify($_POST['from']) . ' <' . cleanify($_POST['fromemail']) . '>';
|
||||||
@ -99,11 +98,11 @@ while ($r = $q->fetch(PDO::FETCH_ASSOC)) {
|
|||||||
users.deleted
|
users.deleted
|
||||||
FROM committees_link
|
FROM committees_link
|
||||||
LEFT JOIN users ON users.uid = committees_link.users_uid
|
LEFT JOIN users ON users.uid = committees_link.users_uid
|
||||||
WHERE committees_id=' . $r['id'] . '
|
WHERE committees_id=?
|
||||||
GROUP BY users.uid
|
GROUP BY users.uid
|
||||||
ORDER BY ord,users.lastname');
|
ORDER BY ord,users.lastname');
|
||||||
|
|
||||||
$q2->execute();
|
$q2->execute([$r['id']]);
|
||||||
|
|
||||||
// if there's nobody in this committee, then just skip it and go on to the next one.
|
// if there's nobody in this committee, then just skip it and go on to the next one.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user