Php : How To Get Select Option Value From MySQL Database Using Php [ with source code ]

preview_player
Показать описание
How To To Populate Html Select Drop Down List With Values From MySQL Database Using Php

--------- Check Out More PHP Projects! ---------

-----------------------

Share This Video:

In this Php Tutorial we will Learn Two Method On How To Populate Html Select Box With Data From MySQL Database Table In Php .
I Use In This Tutorial:
- NetBeans IDE .
- XAMPP .
- PhpMyAdmin .

Others Tutorials:

How To Populate Html Table From MySQL Database Using Php

How To Use Mysqli Num Rows In Php

How To Use Pdo Row Count In Php

Insert Update Delete Search Data In MySQL Database Using Php Part1

Search And Filter Data In Html Table Using Php And MySQL Database

------------ COURSES YOU MAY LIKE ------------

Рекомендации по теме
Комментарии
Автор

Problem solved! I've scouring the net like the whole day and can't find a very simple solution until this video! Thanks man!

greentechnology
Автор

I watched most of your tutorial in doing my final year project, thanks for making all these helpful videos :)

lilmango
Автор

You just saved me from my misery, thanks a lot.

NONAME-djgm
Автор

ฮืออออ จะร้องไห้ เราทำวิจัยจบปี 4 เราทำตามวิดีโอสอนต่างๆมา 2 สัปดาห์ แต่เรายังทำไม่ได้เลย พอมาเจอวิดีโอนี้เราทำได้ ขอบคุณมากนะคะ

knowcgb
Автор

your second method saved me, thank you very much!

daremeto
Автор

Thank you, you've helped me solve my problem😀

Rangkaisaja
Автор

Thanks for your help! :) Especially method 2 is so useful

alicandogan
Автор

Thank you very much your video really helpfull for me

nogamenolife
Автор

How were you able to label that dropdown into "first name"? I can't see that in the code sample. And how can I combine the first name and last name in one dropdown? Thanks again man!

greentechnology
Автор

Thank you very very much guru ji

Amit Agarwal
Delhi, India

AmitAgarwal
Автор

Thank you a lot Friend, you save my life!

CarlosRoberto-krsn
Автор

Thank you your website source code explain well

ThaFox
Автор

Thank you so much sir..u really help me out

misschoa
Автор

I wanted to know when you click on the drop down you can see like if there's "select gender" Than it's duplicating it like when you click on it, it says again select gender than it says male or female how do you remove that

towk
Автор

Thank Man, You explain very well, it works perfect to me!

oscarangelucci
Автор

Whilst I'm able to get the dropdown list, what I'm trying to figure out is how do I make it so that depending on the option choosing, it will display information associated with in in a textbox for example.
Let's say I have a table called Ice cream, the table will display information such as "icecream_id", "icecream_name", "icecream_price" etc.
In the drop box, you can select the name options which are Vanilla, Strawberry and Chocolate. Depending on the option, it will display that specific information associated with it so let's say Vanilla costs £1 and Chocolate costs £2, when I choose Vanilla, it should display in the textbox that the price is £1 or if I choose chocolate, it'll be £2 instead.

How do I go about it? I'm using a <input type"text"> for it (as a stand in to display the information).

foxywoxyw
Автор

Muchísimas gracias amigo!! you solve me a problem with this! hope you well, greetings from Argentina!

deiv
Автор

really good tutorial. simple and clear. I have a question though. I'm trying to create a form which has 2 or 3 drop downs like you example. but I want the I'd stored in a different table. really struggling and I know it's something simple I'm missing. your help would be appreciated.

Trmm
Автор

there is no 1 it should be $row1[0];
those who are facing problems should try it will work,

anyway thanx buddy for sharing this video/...i finally solved it by applying $row[0];

TravelandLuxe
Автор

i use class on my connection.php, and then i create insert.php, i include "connection.php" and then i try ur code. i try to run the code and then error pop up on the insert option say database name already use. Can u help me to fix that?

bagusnataa