Echo a name in a table when an ID is called

I need help with a small function. I have a confirmation email that gets sent out when a user signs up with a code. The email is duplicated to the site admin that is defined. the table the code is in is called codes, the columns are as follows id, code, refuserid. refuserid pull from the table user_referrals and has the following columns, id and refuser. I want the email to display the actual name of the refuser by the refuserid that is assigned to the code.

Hello,

that would be easy to fix, just post your codes and we might help you.

Sponsor our Newsletter | Privacy Policy | Terms of Service