I am using these fields as one of several ways to identify a user that has already registered in the past.
But my code dictates that the user must fill out atleast one of these fields the other two can be left blank if so desired. The user can pick which of these fields they want to fill.
That leaves two of them possily empty.
If in my query I were to write the code
Code: Select all
$query0 = "SELECT
pid,
FROM
parent_info
WHERE
(street_address = '$street')
OR
(h_phone or c_phone or o_phone) = ('$h_phone' or '$c_phone' or '$o_phone')
OR
(email = '$email')" ;Again, this query is to validate that the user has not previously registered, so it's obviously not going to work.
How can I check to make sure that every number entered into my DB is Unique.
In typing this question I think that I have thought of a solution. If it works I will post it, but also, I am a beginner and my hunch is that
this is a common issue and many of you may know a more standard and concise way of woring this out than what I am about to attempt.
Thanks