How do i tie the passkey to the user id in this piece of code without the userid anyone can get hold of a passkey and use it
so basically when a user downloads it checks the userid and passkey are the same for that user so for example
userid=5 passkey=12345 << system checks both id and passkey can download
userid=6 passkey=12345 << system checks both id and passkey blocks download because passkey is different to that user in database
Code:
$rz = mysql_query("SELECT id, uploaded, downloaded, class, downloadpos, enabled, parked FROM users WHERE enabled = 'yes'". (ENA_PASSKEY ? "AND passkey=$passkey ":''). "ORDER BY last_access DESC LIMIT 1");
if ($MEMBERSONLY && mysql_num_rows($rz) == 0)
err("Unknown passkey. Please redownload the torrent from $BASEURL.");
Thanks