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

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

1BestCsharp blog

8 лет назад

318,928 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@alicandogan1330
@alicandogan1330 - 13.04.2023 16:05

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

Ответить
@FunkyColonoCat
@FunkyColonoCat - 03.12.2022 14:49

Thank you very much!

Ответить
@towk9009
@towk9009 - 18.11.2022 19:48

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

Ответить
@rens2282
@rens2282 - 16.11.2022 17:32

you're the man

Ответить
@kusalindhuranga4013
@kusalindhuranga4013 - 12.08.2022 14:12

Thank you... Best solution!!!!!

Ответить
@iyogeshjha
@iyogeshjha - 17.07.2022 06:52

thank you 😚

Ответить
@alidelibas27
@alidelibas27 - 15.06.2022 18:57

do you king

Ответить
@bagusnataa
@bagusnataa - 14.06.2022 03:19

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?

Ответить
@yosrayari9555
@yosrayari9555 - 23.12.2021 20:34

very helpful thanks <3

Ответить
@user-kn8ow8cg3b
@user-kn8ow8cg3b - 09.09.2021 13:45

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

Ответить
@vibecatcher4416
@vibecatcher4416 - 22.06.2021 18:30

Thank you sir

Ответить
@gauravkadyan321
@gauravkadyan321 - 05.06.2021 18:48

thanks brother

Ответить
@user-lu2gw2zl1r
@user-lu2gw2zl1r - 22.05.2021 20:57

What's wrong here can you please check


<select name='from_gateway' class='form-control col-8'> <?php while($row = mysqli_fetch_assoc($result)) { $currency=$row['usd_gateway']; echo "<option value='$currency'>$currency</option>"; } ?> </select> <input type="submit" value="Submit" name="submit">

Ответить
@ZZ-sf8zc
@ZZ-sf8zc - 17.05.2021 15:55

Thanks

Ответить
@foxywoxy0w068
@foxywoxy0w068 - 15.04.2021 16:50

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).

Ответить
@user-ve7yg5mn2v
@user-ve7yg5mn2v - 20.03.2021 14:39

why is the dropdown empty?

Ответить
@NONAME-dj2gm
@NONAME-dj2gm - 07.01.2021 17:49

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

Ответить
@nogamenolife5487
@nogamenolife5487 - 08.12.2020 19:28

Thank you very much your video really helpfull for me

Ответить
@sunil6562
@sunil6562 - 31.08.2020 08:53

Thank you, Very Useful.

Ответить
@ashanair2584
@ashanair2584 - 29.07.2020 13:21

Thankssss

Ответить
@NardoST
@NardoST - 09.07.2020 02:59

algum Br aqui??

Ответить
@mamn96
@mamn96 - 14.05.2020 07:05

Thanks A lot brother.

Ответить
@lilmango6854
@lilmango6854 - 07.05.2020 19:33

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

Ответить
@makdon7113
@makdon7113 - 29.04.2020 17:41

i have quation i need to insert into data base from formulaire it's work whithout code befor <!doctype html> but whene I add it the i cant add anymore
TY

Ответить
@makdon7113
@makdon7113 - 29.04.2020 02:17

thank you so much

Ответить
@davidtall8308
@davidtall8308 - 25.03.2020 20:14

merci sa marche super

Ответить
@aljimsonmegrino9580
@aljimsonmegrino9580 - 25.03.2020 17:34

what if i want to display content if i select 1 of those options??
how to do it??

Ответить
@hanzlalashari8524
@hanzlalashari8524 - 05.03.2020 17:44

bundle of thanks brother

Ответить
@misschoa9358
@misschoa9358 - 27.02.2020 06:45

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

Ответить
@dora-c
@dora-c - 13.01.2020 05:39

Thanks, easy and effective!

Ответить
@omanjabbar200
@omanjabbar200 - 31.12.2019 23:41

Damn... Need to submit project in 2 days and you were really helpful.

Ответить
@smartsmart993
@smartsmart993 - 30.12.2019 00:52

Thank You , second way is great

Ответить
@ThaFox69
@ThaFox69 - 19.12.2019 18:11

Thank you your website source code explain well

Ответить
@daremeto4805
@daremeto4805 - 14.12.2019 16:58

your second method saved me, thank you very much!

Ответить
@alphamekelle2227
@alphamekelle2227 - 13.12.2019 11:04

tnx alot my prob. just solved

Ответить
@stefano8709
@stefano8709 - 02.11.2019 04:23

I LOVE U MAN

Ответить
@TravelandLuxe
@TravelandLuxe - 15.10.2019 19:42

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

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

Ответить
@kennandrewantonio8732
@kennandrewantonio8732 - 09.10.2019 07:28

thanks

Ответить
@joowen4468
@joowen4468 - 27.08.2019 15:28

Thankyou that was very helpful

Ответить
@MoHaMeDAhMeD-mz8lw
@MoHaMeDAhMeD-mz8lw - 11.08.2019 01:38

Big Thanks For U

Ответить
@namanvohra8262
@namanvohra8262 - 06.08.2019 10:22

Thanks! Do u know how to make it dynamic?

Ответить
@jaydipkanpariya4438
@jaydipkanpariya4438 - 18.07.2019 08:21

thank you so much sir

Ответить
@mominababar5625
@mominababar5625 - 13.07.2019 19:18

I followed these steps but the selection menu is empty. Can anyone tell me what mistake I might be making?

Ответить
@mominababar5625
@mominababar5625 - 13.07.2019 19:18

I followed these steps but the selection menu is empty. Can anyone tell me what mistake I might be making?

Ответить
@tambini9
@tambini9 - 26.06.2019 19:54

Thank you very much brother!

Ответить
@greentechnology7346
@greentechnology7346 - 26.06.2019 13:21

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!

Ответить
@greentechnology7346
@greentechnology7346 - 26.06.2019 12:23

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

Ответить
@theamjolnir9641
@theamjolnir9641 - 14.06.2019 22:05

Great tutorial!

Ответить
@maoanz
@maoanz - 03.06.2019 11:16

What is your IDE for php ? seems very efficient !

Ответить
@Beginner_Seven
@Beginner_Seven - 20.05.2019 10:39

thanks that help a lot can you help with updating that can request the selected value from this Select Option Value please if you has link

Ответить