From 1c99f624e53fa4bf3d93fa1d3c72e2ddfb0173ff Mon Sep 17 00:00:00 2001 From: james Date: Wed, 9 Sep 2009 03:05:45 +0000 Subject: [PATCH] Fix contact to actually work with the new user code --- contact.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contact.php b/contact.php index e7732e2..68663fb 100644 --- a/contact.php +++ b/contact.php @@ -34,7 +34,7 @@ if($_POST['to'] && $_POST['subject'] && $_POST['message'] && $_POST['from'] && $_POST['fromemail']) { if(isEmailAddress($_POST['fromemail'])) { list($id,$md5email)=split(":",$_POST['to']); - $q=mysql_query("SELECT * FROM users WHERE id='$id'"); + $q=mysql_query("SELECT * FROM users WHERE uid='$id' ORDER BY year DESC LIMIT 1"); $r=mysql_fetch_object($q); //if a valid selection is made from the list, then this will always match. if($md5email == md5($r->email)) { @@ -104,7 +104,7 @@ function tochange() { if($r2->email) { $name=$r2->firstname.' '.$r2->lastname; if($r2->title) $titlestr=" ($r2->title)"; else $titlestr=""; - echo "\n"; + echo "\n"; } } }