Insert Database - Foreign Field

Hi I need help in inserting record in my user registration form. my users table is simple

  1. user_id (Primary key - AI)
  2. user_first_name
  3. user_last_name
  4. user_email
    .
    .
    .
  5. user_dep_id (foreign key)
    i have tried to make and insert form and for foreign key field, i inserted a select control that gets all departments fro departments table. i have also tried to set value filed as user_dep_id. but still no record is saved in database. please support on how to all foreign key record.
Community Page
Last updated: