Skip to content
Advertisement

Trying to save drop-down menu to database using PHP

I have a form which has drop-down when I try to save the form to database using PHP the other fields are storing in the database but the select drop-down menu is not storing in the database it throws the below error:

Notice: Undefined index: branch in D:xampphtdocsforminsert.php on line 8 Message Saved

I have the below code:

This is the PHP code:

This is the table:

enter image description here

What am I doing wrong?

Advertisement

Answer

You are not passing the branch inside ajax function under data

Should be

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement