Here is my problem.

I have the following fields in a database that are related to the problem.

fname (users first name)
lname (users last name)
pickf (another users first name)
pickl (another users last name)

See a client wants to make a niche dating system where someone enters a first name(pickf) and last name(pickl) of someone else.

Now if that person that he picked put his first name in pickf and his last name in pickl, I need a script that will say that he has a match.

That is kind of confusing.. here is another explanation.

Bob logs on to the web site and registers under the name: Bob Doe(fname=Bob and lname=Doe). He then logs in and types in Jane for the field pickf and Doe for the field pickl.

1 week later....

Jane Doe registers for service. (fname=Jane and lname=Doe). She then types in Bob for the field pickf and Doe for the field pickl.

Now both people technically entered the other persons name.

I am in need for a script to check to see if Bob Doe's pickf/pickl is the name of someone that has their pickf and pickl Bob Doe.

Please help me on this.

I am only looking for the query or lines of code.

I know php fairly well but I am stuck on this.