The document describes how to create cascading dropdown lists for country, state, and city using PHP and Ajax. It involves:
1. Creating country, state, and city tables in a MySQL database to store the options.
2. Creating PHP files - config.php to connect to the database, index.php to display the dropdowns, and load_state_city.php to populate the state and city dropdowns using Ajax calls based on the country and state selected.
3. Using JavaScript/jQuery to make Ajax calls and populate the state and city dropdowns dynamically based on the country and state selected in the previous dropdown.
When run, index.php displays casc
What is JavaScript?
JavaScript is a very powerful client-side scripting language. JavaScript is used mainly for enhancing the interaction of a user with the webpage. In other words, you can make your webpage more lively and interactive, with the help of JavaScript. JavaScript is also being used widely in game development and Mobile application development.
What is JavaScript?
JavaScript is a very powerful client-side scripting language. JavaScript is used mainly for enhancing the interaction of a user with the webpage. In other words, you can make your webpage more lively and interactive, with the help of JavaScript. JavaScript is also being used widely in game development and Mobile application development.
So you're starting a startup an need best practices for your engineering team. Well, look for:
1. Versionning
2. Branching and Pull Requests (GitHub Flow)
3. Deployment & Continuous Delivery
4. Rollback Strategies
5. Testing
6. Backups
7. Monitoring
8. Communication
9. Issue Tracker / Project Management
This deck talks about the tool used by Le Wagon and startup coached by Le Wagon.
Le Wagon is the French innovating coding school for entrepreneurs. More info on https://www.lewagon.com
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)Svetlin Nakov
Cryptography for Java Developers
Hashes, MAC, Key Derivation, Encrypting Passwords, Symmetric Ciphers & AES, Digital Signatures & ECDSA
About the Speaker
What is Cryptography?
Cryptography in Java – APIs and Libraries
Hashes, MAC Codes and Key Derivation (KDF)
Encrypting Passwords: from Plaintext to Argon2
Symmetric Encryption: AES (KDF + Block Modes + IV + MAC)
Digital Signatures, Elliptic Curves, ECDSA, EdDSA
Live demos and code examples: https://github.com/nakov/Java-Cryptography-Examples
Video (in Bulgarian language): https://youtu.be/ZG3BLXWVwJM
Blog: https://nakov.com/blog/2019/01/26/cryptography-for-java-developers-nakov-at-jprofessionals-jan-2019/
So you're starting a startup an need best practices for your engineering team. Well, look for:
1. Versionning
2. Branching and Pull Requests (GitHub Flow)
3. Deployment & Continuous Delivery
4. Rollback Strategies
5. Testing
6. Backups
7. Monitoring
8. Communication
9. Issue Tracker / Project Management
This deck talks about the tool used by Le Wagon and startup coached by Le Wagon.
Le Wagon is the French innovating coding school for entrepreneurs. More info on https://www.lewagon.com
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)Svetlin Nakov
Cryptography for Java Developers
Hashes, MAC, Key Derivation, Encrypting Passwords, Symmetric Ciphers & AES, Digital Signatures & ECDSA
About the Speaker
What is Cryptography?
Cryptography in Java – APIs and Libraries
Hashes, MAC Codes and Key Derivation (KDF)
Encrypting Passwords: from Plaintext to Argon2
Symmetric Encryption: AES (KDF + Block Modes + IV + MAC)
Digital Signatures, Elliptic Curves, ECDSA, EdDSA
Live demos and code examples: https://github.com/nakov/Java-Cryptography-Examples
Video (in Bulgarian language): https://youtu.be/ZG3BLXWVwJM
Blog: https://nakov.com/blog/2019/01/26/cryptography-for-java-developers-nakov-at-jprofessionals-jan-2019/
All Things Open 2016 -- Database Programming for NewbiesDave Stokes
This presentation covers much a new developer needs to know about working WITH a database instead of against it. Plus there is much on what goes on behind the scenes when you submit a query and hints on how to avoid the big problems that can ruin your data
Esoft Metro Campus - Diploma in Web Engineering - (Module II) Multimedia Technologies
(Template - Virtusa Corporate)
Contents:
What is a Database?
The Relational Data Model
Relationships
Normalization
Functional Dependency
Normal Forms
DBMS
What is MySQL?
PHP Connect to MySQL
Create a MySQL Database
Connect to Database
Close Database
Create a MySQL Table
Insert Data Into MySQL
Get Last ID
Insert Multiple Records
Prepared Statements
Select Data From MySQL
Update Data in MySQL
Delete Data From MySQL
Persistence is one of the most important part in a PHP project. Persisting data to a database came with PHP/FI and its MySQL support. From native extensions and PHP4 database abstraction libraries to PDO and modern ORM frameworks, you will (re)discover how persistence has evolved during the last decade. This talk will also introduce the future of data persistence with the growing success of alternative storage engines.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
Sectors of the Indian Economy - Class 10 Study Notes pdf
Country State City Dropdown in PHP
1. PHP Tutorials By vineet Kumar Saini
www.vineetsaini.wordpress.com
Country State City in Dropdown list in PHP using Ajax
First of all we create a database then we will create three tables in databse i.e. country ,
state and city table. Like as following images.
Country Table
CREATE TABLE `country` (
`Country_Id` varchar(255) NOT NULL,
`CountryName` varchar(255) NOT NULL
);
INSERT INTO `country` (`Country_Id`, `CountryName`) VALUES
('1', 'India'),
('2', 'Usa'),
('3', 'Canada');
State Table
CREATE TABLE `state` (
`StateId` varchar(255) NOT NULL,
`Country_Id` int(11) NOT NULL,
`StateName` varchar(255) NOT NULL
);
INSERT INTO `state` (`StateId`, `Country_Id`, `StateName`) VALUES
('1', 1, 'Orissa'),
('2', 1, 'Andhra Pradesh'),
('3', 1, 'West Bengal'),
('4', 1, 'Maharastra'),
('5', 2, 'Arizona'),
('6', 2, 'California'),
('7', 2, 'Texas'),
('8', 3, 'Alberta'),
('9', 3, 'Ontario');
3. PHP Tutorials By vineet Kumar Saini
www.vineetsaini.wordpress.com
Now we will create configuration file in php i.e. config.php. I which file we will create the
database connectivity.
config.php file
<?php
$host="localhost";
$username="root";
$password="";
$dbname="country_dropdown";
$con=mysql_connect("$host","$username","$password");
mysql_select_db("$dbname",$con);
?>
Now we will create index.php
Index.php
<?php
include('config.php');
$Country_query="select id,country_name from country order by country_name asc ";
$Country=mysql_query($Country_query);
$Count_Country=mysql_num_rows($Country);
?>
<html>
<head>
<title>Country State City Drop Down Using Ajax in PHP</title>
<!--<script type="text/javascript" src="js/jquery-1.4.1.min.js"></script>-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"
type="text/javascript">
<script type="text/javascript">
function selectCity(country_id){
if(country_id!="-1"){
loadData('state',country_id);
$("#city_dropdown").html("<option value='-1'>Select city</option>");
}else{
$("#state_dropdown").html("<option value='-1'>Select state</option>");
$("#city_dropdown").html("<option value='-1'>Select city</option>");
}
}
function selectState(state_id){
if(state_id!="-1"){
loadData('city',state_id);
}else{
$("#city_dropdown").html("<option value='-1'>Select city</option>")
}
}
function loadData(loadType,loadId){
var dataString = 'loadType='+ loadType +'&loadId='+ loadId;
5. PHP Tutorials By vineet Kumar Saini
www.vineetsaini.wordpress.com
<select id="city_dropdown">
<option value="-1">Select city</option>
</select><span id="city_loader"></span>
</td>
</tr>
</table>
<?php
}else{
echo 'No Country Name Found';
}
?>
</body>
</html>
load_state_city.php
<?php
include('config.php');
$loadType=$_POST['loadType'];
$loadId=$_POST['loadId'];
if($loadType=="state"){
$sql="select id,state_name from state where country_id='".$loadId."' order by
state_name asc";
}else{
$sql="select id,city_name from city where state_id='".$loadId."' order by
city_name asc";
}
$res=mysql_query($sql);
$check=mysql_num_rows($res);
if($check > 0){
$HTML="";
while($row=mysql_fetch_array($res)){
$HTML.="<option value='".$row['id']."'>".$row['1']."</option>";
}
echo $HTML;
}
?>
Output
When we run the index.php file then we will get following output. Suppose we select
Canada from country dropdown then display state in state dropdown along with Canada.
When we select state from state dropdown then city will display in city dropdown along
with selected state.
6. PHP Tutorials By vineet Kumar Saini
www.vineetsaini.wordpress.com
.1 .2
.3 .4
Conclusion
Using this article one can get easily understand cascading dropdown list in php.