Populating Drop Down menus from Database

  Рет қаралды 94,041

PHPBasics

PHPBasics

Күн бұрын

Пікірлер
@louisjennings5203
@louisjennings5203 4 жыл бұрын
I've been researching this for two days solid and this is the first time I found a clear and concise explanation of what to do and why. Thank you immensely!
@OsukaX
@OsukaX 5 жыл бұрын
It worked, I was hitting my head against a wall before I've found this video. Thanks pal.
@chandresh.t6405
@chandresh.t6405 3 жыл бұрын
you are teaching very well sir thank you
@senju31
@senju31 3 жыл бұрын
Much love from Jamaica. This is exactly what I was looking for and the video is very short. *Gracias*
@pavanvspk8928
@pavanvspk8928 3 жыл бұрын
bro... iam struggling with normal Mysql functions and wexed. But with this procedure...i am continuing with my work. Good Job from your side on posting this valuable video. TQ
@kaivanDoshi
@kaivanDoshi 4 жыл бұрын
A small tip if using bootstrap then dont' forget to add class="custom-select mr-sm-2" id="inlineFormCustomSelect" in the select tag
@auroraseco5746
@auroraseco5746 4 жыл бұрын
a simple and practical example, thanks for the video
@dbean2321
@dbean2321 5 жыл бұрын
Would love to see more videos on PHP PDO and advanced topics connecting Front and Backend
@johnvins2884
@johnvins2884 5 жыл бұрын
A real novice here---I get the gist of it but not how to run it? What editor are you using and are you on windows or linux? Save the file where and then when you say go to localhost to see the dropdown list, doesn't the db and this file need to be in the same directory? I'm on Centos 6.5, have LAMP and phpmyadmin. A good start for me to learn how to start a subquery when I click on a name in the list and to show a hyperlink to it for more information about the selection.
@silviopontes9832
@silviopontes9832 4 жыл бұрын
It was very good! If we have another information in table; How to fill in another field with according to the data on option selection?
@jacopieterse4674
@jacopieterse4674 6 жыл бұрын
Nice, but how about in a relational db where you'd store the code of the Dept and not the name even though you'd like to display the name?
@christiancolewan
@christiancolewan 2 жыл бұрын
Great tutorial, can you explain how we can set the value of each line/option so that each line will have the same value as the text once submitted, because I got blank data whenever I press on submit.
@phpBasics
@phpBasics 2 жыл бұрын
That's what I'm demonstrating in this video. If you're still having issues, you can hit me up on Skype: CoolEditz
@christiancolewan
@christiancolewan 2 жыл бұрын
@@phpBasics I appreciate your fast reply, I was able to pass the text into the option 'value' here's what I did. class="ass"id="xyz" onChange="window.location.href=this.value"> Actions
@kumaratul484
@kumaratul484 3 жыл бұрын
Can we populated it in sign up form which will comes from plugin. If possible then please let me know.
@binoythomas2974
@binoythomas2974 5 жыл бұрын
Simple but powerful. Thanks a lot.
@iamsarb_0017
@iamsarb_0017 3 жыл бұрын
1 more question is - Is it compulsory to add data in column earlier so we can fetch& then again put it in another table is there any other way for this?
@ZetaHook
@ZetaHook 4 жыл бұрын
Good tutorial, but how do i get the array result to use it on another query? if I use this method the variable just select the last item show in the manu
@jgonsuron
@jgonsuron 4 жыл бұрын
I had the same problem. I solved it by creating multiple instances of the query - ie. $resultSet1, $resultSet2, $resultSet3, etc... it looks like once a query is run, the data generated can only be used in one while loop. I'm new and could be wrong, but this worked for me.
@azeeomole2083
@azeeomole2083 3 жыл бұрын
Hello thank you for the tutorial. How can I give the dropdown a scroll bar?
@dougbrown2035
@dougbrown2035 5 жыл бұрын
great video! I'm very new to PHP, is there a good way to take the selection and populate another page with the choice? for example if the selection is "Administration", the user selects it, clicks a submit button and it takes them to another page populated by sql data related to that selection.
@phpBasics
@phpBasics 5 жыл бұрын
Yep, that's very doable in a variety of ways. Hit me up on Skype if you want to discuss it further - CoolEditz
@dougbrown2035
@dougbrown2035 5 жыл бұрын
@@phpBasics I appreciate it - I'll reach out sometime this week.
@snowfallztech
@snowfallztech 4 жыл бұрын
Based on your idea it helped me complete my university project issue but codes works on different work criteria .This Code doesn't helped but idea helped me though Thanks Buddy
@willemjacobusblom
@willemjacobusblom 4 жыл бұрын
You're the best! Thanks so much
@wamoka9381
@wamoka9381 4 жыл бұрын
👏 👏 Nice tutorial. I have a question 🙋. How do you make a dropdown select from a table in a database and insert the selected value into another table?
@phpBasics
@phpBasics 4 жыл бұрын
I have a tutorial on that coming up shortly! If you need some help, send me a message on Skype: CoolEditz
@nitindhamale8789
@nitindhamale8789 6 жыл бұрын
Nice one very good explanation
@iTzBoosTerZx
@iTzBoosTerZx 5 жыл бұрын
Great tutorial! But can you show how to do this with an external PHP file if this is possible in some way?
@senju31
@senju31 3 жыл бұрын
External php file?
@Random-xs8dp
@Random-xs8dp 3 жыл бұрын
Big thank you bro
@wixwixy3025
@wixwixy3025 4 жыл бұрын
Thanks for the tutorials - amazing stuff! Have used your search box tutorial as well as the dropdown one above to great success (on the same page) . I was wondering if it's possible to display more 'fields' from the database on a page, whilst using the dropdown as a trigger? thanks again!!
@phpBasics
@phpBasics 4 жыл бұрын
You can, but you would need to introduce JQUERY or another AJAX wrapper since PHP doesn't update in real-time.
@iamsarb_0017
@iamsarb_0017 3 жыл бұрын
how to insert value from dropdown list to database(from php code to database just like different country name in list select it & stored in database )??
@phpBasics
@phpBasics 3 жыл бұрын
You would give the select tag a name and process it like a normal form value.
@KingVega73
@KingVega73 6 жыл бұрын
Great Video. I am searching a solution with a problem I am stuck in and maybe your code can help, but i need some more suggestion. Imagine to have a database with the classical fields State, Cities address, telephone, email, ecc... I wish that a the name of the state appears only once and add a dropdown with all the cities and when a city is selected, all the other fields showing the correct value. Thanks in advance.
@phpBasics
@phpBasics 6 жыл бұрын
Greetings. You will need to download and import a database of cities and states. The rest could be done with JQUERY and AJAX. Things like this are typically done with .NET, PYTHON, or Ruby on Rail. However, I've done it with PHP and JQUERY and it does the job. If you have Skype, we may be able to work through it together.
@KingVega73
@KingVega73 6 жыл бұрын
Hi. Thanks foer your fast answer. I have already my own db with all the fields i told you before, the problem is that while i have some basic knowledge of PHP my culture on JQUERY and AJAX is more than limited... Yes I have skype. If is not a problem for You, just send me your username there and i will contact You if it's not a problem.
@phpBasics
@phpBasics 6 жыл бұрын
CoolEditz
@nikilasandarage1066
@nikilasandarage1066 5 жыл бұрын
Thank you very much buddy!! This helped alot!! Explained precisely. Thanks again!
@heartattackingirl
@heartattackingirl 4 жыл бұрын
thank u so much it was super easy and very helpful
@oyekunleogunsina5266
@oyekunleogunsina5266 5 жыл бұрын
Very concise. Thanks a lot
@abbasalibhai9815
@abbasalibhai9815 4 жыл бұрын
THANK YOU SO MUCH. You literally saved me! Thanks man!
@christiannibarger4996
@christiannibarger4996 4 жыл бұрын
You're a God. Thank you for this
@cybreed
@cybreed 5 жыл бұрын
simple and nice, thank you!
@mayazoughbi6224
@mayazoughbi6224 4 жыл бұрын
its not taking from the database all content its only taking one from it what should i do? example from departments its taking accounting.
@phpBasics
@phpBasics 4 жыл бұрын
Hi Maya, feel free to reach out on Skype: Cooleditz
@johnattipoe7440
@johnattipoe7440 5 жыл бұрын
How do you add the selected value to a new table
@aliyegulduk5166
@aliyegulduk5166 4 жыл бұрын
Thank you very much!
@kingking-qj5bp
@kingking-qj5bp 4 жыл бұрын
very simple, the best simple one ever.
@MrMajorYT
@MrMajorYT 6 жыл бұрын
Hi, I was wandering if you could help me. I have set the session and connected to MySQL Database fine, The problems come when i place the while loop around the existing IF statement for my session. It seems to be picking the records up individually rather than as a group. Any Suggestions?
@phpBasics
@phpBasics 6 жыл бұрын
Send your source code to phpbasics@yahoo.com and I'll take a look at it.
@lakruwansenadheera
@lakruwansenadheera 3 жыл бұрын
how can we do it on android studio? please help
@sofienmefteh993
@sofienmefteh993 6 жыл бұрын
Thank you so much sir. You helped me . I was blocked for two days becose of this code.
@sleepyScush11ie_
@sleepyScush11ie_ 4 жыл бұрын
is there a python way to do this ?
@mohamudrashid4528
@mohamudrashid4528 4 жыл бұрын
what if you want to save the selected item in another table
@phpBasics
@phpBasics 4 жыл бұрын
You name of the option passes through the form. Save it to whatever table you want after you process it.
@neymat3257
@neymat3257 4 жыл бұрын
Thank you sir 👍
@nurnaafizahmohammadrapi9285
@nurnaafizahmohammadrapi9285 3 жыл бұрын
huhuuu, i am beginner i still get stuck doing this, i followed your step sudah..whats wrong with my code , can u help me
@nurnaafizahmohammadrapi9285
@nurnaafizahmohammadrapi9285 3 жыл бұрын
Warning: mysqli::mysqli(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO) in C:\Program Files (x86)\Ampps\www\Test111\Index.php on line 3 Warning: mysqli::query(): Couldn't fetch mysqli in C:\Program Files (x86)\Ampps\www\Test111\Index.php on line 5
@nurnaafizahmohammadrapi9285
@nurnaafizahmohammadrapi9285 3 жыл бұрын
@phpBasics
@phpBasics 3 жыл бұрын
@@nurnaafizahmohammadrapi9285 You aren't connecting to the database correctly. The password for root is incorrect.
@deepakkumarthangavel9574
@deepakkumarthangavel9574 2 жыл бұрын
Thanks bro it helped me
@kennyrobertson9027
@kennyrobertson9027 4 жыл бұрын
Hey, thank you, it works for me. Now I am trying to save dropdown data over multiple pages but are unable to keep the data when I go back to the previous page, please help.
@phpBasics
@phpBasics 4 жыл бұрын
Send me a message on skype: CoolEditz
@aymanmustafa2378
@aymanmustafa2378 4 жыл бұрын
dude, would be great if you provide your code so we can copy and paste it.
@phpBasics
@phpBasics 4 жыл бұрын
The idea behind this channel is to teach people how to code, not provide free source code for lazy people.
@cjellal
@cjellal 6 жыл бұрын
How can i retain them after I press the submit button sir?
@phpBasics
@phpBasics 6 жыл бұрын
I believe I have a video on that.
@พิชาภพบุญฑล
@พิชาภพบุญฑล 4 жыл бұрын
THANK YOU SO MUCH, from thai.
@DidYouKnowDaily786
@DidYouKnowDaily786 4 жыл бұрын
Thank you so much Bro
@Beastboy9x
@Beastboy9x 5 жыл бұрын
Thankss, u save my life man
@tiesfa
@tiesfa 5 жыл бұрын
I keep getting PHP error 500... Trying to fix it, thanks for the good tutorial tho!
@markwoodard4640
@markwoodard4640 5 жыл бұрын
Thank you!
@talhamuneer2599
@talhamuneer2599 5 жыл бұрын
Thanks A Lot Man!
@corinal73
@corinal73 4 жыл бұрын
thank you!!
@fitriantoadipratama4269
@fitriantoadipratama4269 4 жыл бұрын
Thanks bro,
@traveldiaries3266
@traveldiaries3266 5 жыл бұрын
Thank a lot...it worked..
@sedawattacargo5482
@sedawattacargo5482 5 жыл бұрын
Thank you
@КатанычТВ
@КатанычТВ 3 жыл бұрын
thank you from russia!
@arung8344
@arung8344 4 жыл бұрын
It worked. .
@nizamersoft
@nizamersoft 5 жыл бұрын
This video is useless as it does not teach us how to display name in frontend but insert its id in database when form is submitted.
@90MSB
@90MSB 4 жыл бұрын
Thank you
@shalombentenzingnamchyo9384
@shalombentenzingnamchyo9384 3 жыл бұрын
Thank you
how to insert a dropdownlist value into database using PHP Mysql
21:17
Funda Of Web IT
Рет қаралды 85 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
Dependent Drop Down List in Php and Mysql  ( Part 1)
21:35
The Code Knowledge
Рет қаралды 54 М.
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 222 М.
How to get / populate select option values from database using PHP
7:56
OpenAI's New AI BROKE FREE and No One Can STOP IT!
9:24
AI Revolution
Рет қаралды 900
Database Sharding and Partitioning
23:53
Arpit Bhayani
Рет қаралды 106 М.
Dependent Drop Down list In PHP and MySQL using jQuery Ajax
13:51
learnWebCoding
Рет қаралды 101 М.
Inline editing with Jquery/PHP/MySQL
32:03
PHPBasics
Рет қаралды 14 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН