Ok, here's my problem. I have a form for the customer to fill out to register. On the form, there's a field name "Product ID". And on the SQL database, there is a list of different "Product ID" values.
PLEASE NOTE that this form is working fine, but....
What I want to do is when someone register, then click "submit", the form should check to see if the value in "Product ID" field same as the one on the database or not. If the value in "Product ID" field is same as one of the "Product ID" values on the database, then the registration process is complete. If the value in "Product ID" field doesn't match with any of the values on the database, then the form should give an error.
Please help if you know how to do this, or tell me if you know what this is called, so I can search to learn more about it. Any help is greatly appreciated.
Below is part of the code that processes the values(email address, username,etc..) from the form to see if the value on the form same as the one on the database or not, if same then the form gives an error, if not then the registration is complete. Unfortunately what I want to do is reverse... Anyway I'm just wondering if the code for what I want to is similar to the one below....
<code>
$query = mysql_query("select id from authlib_data where email = '$email'");
$result = @mysql_num_rows($query);
if ($result > 0) {
mysql_close();
return $this->error[13];
</code>