ViewUserData.php
<?php
$DatabaseServer = "localhost";
$DatabaseUsername = "root";
$DatabasePassword = "root";
$DatabaseName = "demo";
$Connection = mysqli_connect($DatabaseServer , $DatabaseUsername , $DatabasePassword , $DatabaseName);
if($Connection=== false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
$SQL = mysqli_query($Connection, "SELECT * FROM User");
$Result = array();
while($Row = mysqli_fetch_assoc($SQL)) {
$Result[] = array(
'FirstName' => $Row['FirstName']
);
}
echo json_encode($Result);
?>
Output:
JSON Array:
[{"UserID":"1","FirstName":"Ram","LastName":"Sri"}]
ViewUserData.html
<Html>
<head>
<script language="JavaScript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script>
$(document).ready (function () {
$.getJSON ("ViewUserData.php",
function (json) {
for (var i = 0; i < json.length; i++) {
$("#UserID").append("<option>" + json[i].FirstName+ "</option>");
}
});
});
</script>
</head>
<body>
<select id='UserID'>
//Your Json Array comes here
</select>
</body>
</html>
Output:
MySQL: Run these two queries
CREATE TABLE `user` (
`UserID` int(12) NOT NULL,
`FirstName` varchar(48) NOT NULL,
`LastName` varchar(48) NOT NULL,
`Email` varchar(128) NOT NULL,
`City` varchar(48) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `user` (`UserID`, `FirstName`, `LastName`, `Email`, `City`) VALUES
(1, 'Ram', 'Sri', 'zzz@zzz.com', 'Delhi'),
(2, 'Krishna', 'Vasudev', 'yyy@yyy.com', 'Delhi');
Thank's
ReplyDeleteGood post
Great Article
DeleteCyber Security Projects for CSE Students
JavaScript Training in Chennai
Project Centers in Chennai
JavaScript Training in Chennai
Thanks For Your Post.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteBuy perfect money in India @Rs.70/- per pm Sell @Rs.58/- per pm,CALL 08054019105, Chandigarh, 160017
ReplyDelete--------------------------------------------------------------------------------------------------------------
Buy/Sell Perfect Money At Reasonable Rates. We Provide Perfect Money At best Rates.
We also sell buy Perfect Money, neteller and Bitcoin.
Call us : +91 9517544444
Gtalk : garrysingh1598
Web.: www.sellperfectmoney64.com
Most of the students who look for an academic writing solution simply search for such on a site on the most widely used search engine and select anyone firm from the top websites there.But little do they know that going through a review of such websites will give you much insight about it which you can’t know by simply visiting it.
ReplyDeleteAll Assignment Help review
Thanks for the great writeup. This the fact is once were some sort of pleasure bank account this.Commercial Led Lighting
ReplyDeleteJune Florist - Same day flower delivery singapore. Call June Florist for floral arrangements for wedding, decorations for conferences, hand banquet decorations, Flower Box, table flower arrangement & more. Tel: +65 6282 7555
ReplyDeleteonline flower shop singapore
online flower delivery
Lighting Warehouse Sydney Eye-catching element of written content. I merely came across your own web site and accession capital to say that we receive essentially liked account your current blog page discussions
ReplyDeleteThanks for the great writeup.
ReplyDeletefree games
excellent post!!!
ReplyDeletenorton antivirus
anti virus
norton security
best antivirus
norton 360
free virus protection
antivirus for mac
tech support
symantec
norton
norton login
norton security
antivirus software
norton login
norton account
norton internet security
computer repair
virus protection
virus cleaner
virus scan
virus removal
threat protection
norton removal tool
my norton account
florist
ReplyDeleteflower delivery to singapore
buy flower bouquet
flower shop delivery singapore
condolence wreath
You have helped to increase our kowedge in this field.
ReplyDeleteThanks for sharing .
online meat delivery in kolkata
online meat kolkata
Online Meat Shopping in kolkata
household items in kolkata
online grocery Shop kolkata
Online Fish Store in kolkata
online vegetables shop in kolkata
Online Meat Shopping in kolkata
fresh bazar in kolkata
Pretty blog, so many ideas in a single site, thanks for the informative article, keep updating more article.
ReplyDeleteWebdesining course in chennai
ReplyDeleteHi guys, It’s always the first and important step for electric-guitar-beginners to get their first “right” BEST electric guitar. Because that guitar will follow us through our first stage in the guitar world. You know that since you’re reading this topic and haven’t yet picked a guitar randomly in a store, on the internet or recommended by some friends.
if you want more just look here Studio Microphone
Blog của bạn all posts messages is very exclusive and good for the user because when you have read your blog look the symbol is not allowed for me. I want to thank thank you. Most priority is you have a bookmark your web to update the future.
ReplyDeletehotmail login
This is really great work. Thank you for sharing such a good and useful information here in the blog.
ReplyDeleteAre you using roadrunner mail service or facing Roadrunner Email Problems and want help. just dial our customer service number +1-888-338-6033
I want to say thanks to you. I have bookmark your site for future updates.
ReplyDeleteKindle won't connect to wifi
Thanks for a marvelous posting! I actually enjoyed reading it, you can be a great author.I will be sure to bookmark your blog and definitely will come back later on. I want to encourage you to definitely continue your great job, have a nice afternoon! digital marketing trends
ReplyDeleteHey would you mind letting me know which web host you're working with? I've loaded your blog in 3 different browsers and I must say this blog loads a lot quicker then most. Can you suggest a good hosting provider at a reasonable price? Thanks, I appreciate it!Amaron Inverter in Chennai
ReplyDeleteJava Assignment Help
ReplyDeleteMany times students are tensed for their projects and assignments, so at that time they can take online assignment help to complete it on time. There are experts available online who prepare the perfect assignment for you.
you can go through AllAssignmentHelp reviews. It will help you to know about the services, and it will help you to know whether that site is reliable or not. This is a way of understanding the opinion of users, and it helps the website to maintain its functionality and reliability.
ReplyDeleteQtp training in Chennai
ReplyDeleteBig Data Training in Chennai
Hadoop Training in Chennai
Android Training in Chennai
Selenium Training in Chennai
Digital Marketing Training in Chennai
JAVA Training in Chennai
web designing training in omr
web designing training in anna nagar
web designing training in Tnagar
It's so nice. I suggest to my friends on this blog. This is a very great powerful post. Thank you and keep it up...
ReplyDeleteIELTS coaching in Chennai
IELTS coaching centre in Chennai
Jmeter Training in Chennai
TOEFL Coaching in Chennai
Spoken English Classes in Chennai
IELTS coaching in Adyar
IELTS coaching in Porur
IELTS coaching in Anna Nagar
ReplyDeleteSEO Company in Almora Uttarakhand
SEO Service Almora Uttarakhand
Digital Marketing Agency Almora
PPC Services in Almora Uttarakhand
Best Website Promotion Company Almora
SEO Freelancer in Almora Uttarakhand
Internet Marketing in Almora Uttarakhand
Thanks for sharing about "How To Populate JSON Data In Select Dropdown Using jQuery?" Your post is really helpful for PHP users. I hope you will share another post for your readers.
ReplyDeleteKindle Fire Wifi Connection Failure
Thank you for sharing this resource with me and the world. Wish you always luck.AllAssignmenthelp.com reviews
ReplyDeleteI believe that your blog will surely help the readers who are really in need of this vital piece of information. Waiting for your updates.
ReplyDeleteIELTS Classes in Mumbai
IELTS Coaching in Mumbai
IELTS Mumbai
Best IELTS Coaching in Mumbai
IELTS Center in Mumbai
IELTS Coaching in Chennai
IELTS Coaching Centre in Chennai
IELTS Training in Chennai
IELTS Chennai
Best IELTS Coaching in Chennai
ReplyDeleteGreat info. The content you wrote is very interesting to read. This will loved by all age groups.
Angularjs Training in Chennai
Angularjs Course in Chennai
CCNA Training in Chennai
Salesforce Training in Chennai
Angular5 Training in Chennai
Angular6 Training in Chennai
Angular7 Training in Chennai
Angularjs Training in Chennai
Angularjs Course in Chennai
Office.com/Setup is a set of desktop applications, which is widely used products for the home as well as an office. Microsoft office gives the freedom of writing documents, blogs, letters and with the use of Microsoft office PowerPoint one can prepare a presentation also.
ReplyDeletehowtominernewswatt
Norton.com/Setup
Office.com/Setup
Office.com/Setup
office Setup
Daily Helps
office.com/Setup
Office Setup is a software which is used by almost all company and business and even by individuals For all their office activities or for personal use. It has excels, word, and ppt as their constituent are most widely used apps. For any concern and help just visit website for office help and key activation. You can do it by yourself if you know how to install office setup on your PC or Mac or you can call third party companies as well who can do it on your behalf.
ReplyDeleteoffice.com/Setup
office.com/Setup
Norton.com/Setup
office.com/Setup
office.com/Setup
office.com/Setup
Norton.com/Setup
Assignment writing services are providing our experts. Fully guide and help writer your assignment. Our experts are available anytime helping you. Direct hire at our website australiaasignmenthelp.com
ReplyDeleteIreland assignment help provides the best assignment help to all students of Ireland. We offer the outstanding assignment writing help services by assignment helper at an affordable price. So, students can get good marks and also impress their college and universities mentors, so, email us at info@irelandassignmenthelp.com
ReplyDeleteAmazing Post. If you are dealing with any kindle issues then contact Kindle Help Guide expert team. You can call on our toll – free kindle helpline number USA\Canada: (+1) 8889494666, UK: (+44) 8000418324 or visit our website kindle help guides.
ReplyDeleteHey there! This is my first comment here so I just wanted to give a quick shout out and tell you I truly enjoy reading your posts. Can you recommend any other blogs/websites/forums that cover the same topics? Thank you!e-commerce website
ReplyDeleteAwesome post
ReplyDeleteThanks
resellerclub | thesmespace | fstoppers | hubpages | mollysonic
Interpages
ReplyDeleteGuest Blogger
Best Guest Blogging Site
Guest Posting Site
Guest Blogging Website
Nice Post
ReplyDeleteBest Learning Management System
joomla moodle single login
Prestashop Plugin development and customization
Magento Web Development Services
Moodle Service Provider
Thanks for the post I actually learned something from it. Very good content on this site Always looking forward to new post. Digital Signature Certificate
ReplyDeleteGood day! I know this is kinda off topic but I was wondering if you knew where I could find a captcha plugin for my comment form? I'm using the same blog platform as yours and I'm having problems finding one? Thanks a lot!
ReplyDeleteBuild the Content
Thanks for such a continuous great postings. Digital Signature Certificate
ReplyDeleteI think this is among the most vital information for me. And i'm glad reading your article. But should remark on some general things, The website style is perfect, the articles is really excellent : D. Good job, cheers
ReplyDeleteadvertising on social media platforms
It's best to take part in a contest for top-of-the-line blogs on the web. I'll recommend this site!
ReplyDeletedigital marketing promotions
Thank you so much for providing such useful content. Class 2 Digital Signature Certificate
ReplyDeleteThanks For Sharing This, Very Interesting And Helpful Support Provide By this blog. Apply Class 3 Digital Signature Certificate
ReplyDeleteIs it accurate to say that you are confronting
ReplyDeleteNorton Error 8504 102 and unfit to begin the item? You should simply fix this blunder b interfacing the knowledgeable techniques. You can utilize group watcher to give the specialists a chance to fix basic framework issues and few of the incorporate framework organizing, reinforcement, cleaning, and recuperation.
I'm really enjoying the design and layout of your blog. It's a very easy on the eyes which makes it much more enjoyable for me to come here and visit more often. Did you hire out a designer to create your theme? Fantastic work!
ReplyDeletedigital marketing landscape
There are so many collections of jumpsuit at Indianochre.com. You can buy here different types of dresses for women’s.
ReplyDeleteDress and Jumpsuit Collection
Online Women Clothing Delhi
ReplyDeletethanks for your information really good and very nice web design company in velachery
Very nice post with lots of information. Thanks for this updates.
ReplyDeleteui ux design course in Chennai
ui ux designer course in Chennai
ui ux course in chennai
ReactJS Training in Chennai
Web Designing Course in chennai
web designing training in chennai
Tally course in Chennai
ui ux design course in Porur
ui ux design course in Tambaram
ui ux design course in Adyar
Thanks for good posting.If you are dealing any kind of issues regarding to translation.Our professional linguist expert emphasize to make effective,error free translation.Translation work by Singapore translators is always appreciable,rewardable.
ReplyDeletegreat and nice blog thanks sharing..I just want to say that all the information you have given here is awesome...Thank you very much for this one.web design company in velachery
ReplyDeleteExcellent and nice post. It will beneficial for everyone. Thanks for sharing such a wonderful post.
ReplyDeleteMcAfee.com/Activate
office.com/setup
Excellent and nice post. It will beneficial for everyone. Thanks for sharing such a wonderful post.
ReplyDeleteMcAfee.com/Activate
office.com/setup
McAfee.com/Activate
When I initially commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment is added I get three emails with the same comment. Is there any way you can remove people from that service? Appreciate it!
ReplyDeletemarketing agency in singapore
Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
ReplyDeleteWeb Designing Training Institute in Chennai | web design training center in chennai | web designing course in chennai with placement
Mobile Application Development Courses in chennai
Data Science Training in Chennai | Data Science courses in Chennai
Professional packers and movers in chennai | PDY Packers | Household Goods Shifting
Web Designing Training Institute in Chennai | Web Designing courses in Chennai
Allassignmenthelp is your academic caretaker. Our online assignment assistance is one of the most sought after in the US and other countries and you should give us a chance to assist you. Free Plagiarism Checker Turnitin
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHope you will keep on offering good content like this more often. I feel more and more people should know about this. Also, I agree on most of the points you have made.
ReplyDeleteFinance Assignment Help
I enjoy kinds very own post. It will be respectable to get a single narrative inside and outside of the core of this distinctive core specialized niche will likely be commonly knowledgeable.
ReplyDeletehow to write a good college essay
good college essays
college essay tips
Lucky Patcher smile could be a must-have hacking app for all the crazy gamers is Lucky Patcher Apk. This app helps in modifying most of the android games so the games will be enjoyed to the fullest you can also check How to Use Lucky patcher.
ReplyDelete