Current location: Hot Scripts Forums » Programming Languages » PHP » SQL database registration form help

SQL database registration form help

 
Prev Previous Post   Next Post Next
  #1  
Old 10-08-03, 12:42 PM
vinhkhuong vinhkhuong is offline
New Member
 
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
SQL database registration form help

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>
Reply With Quote
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
asp: URGENT! need to change code to create new form per id seala ASP 2 09-09-03 10:54 PM
asp: checkboxes & multi-page form seala ASP 0 09-02-03 02:58 PM
Need to submit form to database and text file - Any ideas how? dpreiss ASP 1 08-21-03 07:02 PM
change my field in this example sal21 ASP 3 07-14-03 03:49 AM
form to sql to html cadtank New Members & Introductions 3 06-23-03 10:37 PM


All times are GMT -5. The time now is 08:38 AM.
vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2 (Unregistered)