please help me in creating this form
i have created two forms.first is registration form(contains fields referer id ,name...etc) and second is pin_id form.the pin_id form contains records of different id numbers n pins(contains fields id and pin).i want that while filling the registration form .when the user fills the referer id field the inputted data must match with anyone of the id in the id field of pin_id form database.please tell me how to create this type of form.what will be the procedure and codes.