Jump to content

Drop down menu/Assigning ID


7oxic

Recommended Posts

Whats up? I'm needing a little help assigning some IDs to a table in my database. I'm gonna try and explain this so you guys can understand me.

 

I need 2 drop down menus, one for Sales Reps and one for Regions. When they select those options I need them to assign to a database table. Also, how would I go about getting an ID to transfer to a new page, so it knows what database to store the information in.

 

Hope you guys understand.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/118266-drop-down-menuassigning-id/
Share on other sites

This is what I would do base on what you are saying.  Create a table that has fields to capture the sale reps name and the region they belong to such as:

 

table name is sale_rep

(

  id //this is for the unique ID that will auto_increment each time you add a new sale reps.  this takes care of your question regarding transferring ID to another page

  name //sale reps name

  region //name of the region they belong to

)

 

So, you will have a form that will have the two drop down menus and just pass that information they selected to the second page.  The second page is where you will do an INSERT statement in the sale_rep table.  I hope this is what you are looking for.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.