I do have 2 tables;
Contacts table, Communications table
Contacts table rows are; contact_number, forename, surname
Communications table rows are; contact_number, number (number is used for emails)
What I have is a little form to check/find out the contact number by filling;
surname forename and email.
Once they filled in I need to run sql query
SELECT contact_number FROM these two tables WHERE forename='$forname' surname='$surname' number='$email'
as well as checking if surname and forename's contact_number matches with given email's contact_number. If exists echo the contact_number to the user.