Quote:
Originally Posted by edhan
Yes. email is the username@domain.com
$res =get_user($tofriendid,"username",$tofriendemail, "username\@domain.com");
The email is the field in the table. Same goes with the username is the field in table. The $tofriendid will actually be in the form of username1,username2,username3 .... or just username1 added into a new table. So, if it is username1,username2,username3 then the email will be emailuser1,emailuser2,emailuser3 will be added into the new table.
As the username1,username2,username3 will be entered manually by my user to be included as friend in the new table, the emails have to be corresponding to the username1,username2,username3 etc from the default table and save into a new table.
Hope this explanation is not too confusing. So, I won't be able to define username@domain.com since I will not know what username will be key in.
|
Also, how to change this to include the email?
function get_id_by_username($user)
$cond = "username='".trim($user)."' and active='1'";
$result = getField("register",$cond,"userid");
if($result != false && mysql_num_rows($result)>0)
The above extract the username so how do I add the email to change $cond = "username='".trim($user)."', email and active='1'";
but still not showing email to add.
Any advice how to change that?