Ex No: 6 Web Application using PHP
Aim:
To create a web application using php.
Algorithm:
Step 1: create a [Link] file
Step 2: configure the XAMPP server.
Step 3: Execute the query and create database name and table name.
Step 4:.Add the student details into the table.
Step 5: For displaying the table information in online, [Link] itself styles has
been used.
Step 6: you can do update, sort by order, remove the added items from the table.
Program:
Create Dbase
<?php
$link = mysqli_connect("localhost", "root", "");
// Check connection
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
// Attempt create database query execution
$sql = "CREATE DATABASE pacet";
if(mysqli_query($link, $sql)){
echo "Database created successfully";
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
1
// Close connection
mysqli_close($link);
?>
2. Create Table
<?php
$link = mysqli_connect("localhost", "root", "", "pacet");
// Check connection
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
// Attempt create table query execution
$sql = "CREATE TABLE cse(
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
email VARCHAR(70) NOT NULL UNIQUE
)";
if(mysqli_query($link, $sql)){
echo "Table created successfully.";
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
// Close connection
mysqli_close($link);
?>
4. [Link]
<?php
$link = mysqli_connect("localhost", "root", "", "pacet");
2
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
$first_name = mysqli_real_escape_string($link, $_REQUEST['first_name']);
$last_name = mysqli_real_escape_string($link, $_REQUEST['last_name']);
$email = mysqli_real_escape_string($link, $_REQUEST['email']);
$sql = "INSERT INTO cse (first_name, last_name, email) VALUES ('$first_name',
'$last_name', '$email')";
if(mysqli_query($link, $sql)){
echo "Records added successfully.";
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
mysqli_close($link);
?>
[Link] Form using PHP
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Add Record Form</title>
</head>
<body>
<form action="[Link]" method="post">
<p>
<label for="firstName">First Name:</label>
<input type="text" name="first_name" id="firstName">
</p>
<p>
<label for="lastName">Last Name:</label>
<input type="text" name="last_name" id="lastName">
</p>
<p>
<label for="emailAddress">Email Address:</label>
<input type="text" name="email" id="emailAddress">
3
</p>
<input type="submit" value="Submit">
</form>
</body>
</html>
Output
4
Result:
Thus the given PHP with MYSQL program has been executed successfully.
Ex No: 7 Designing XML Schemas
Aim:
To design a XML schema for student information system
Algorithm:
Step 1: Create elements for your XML Schema.
Step 2: Define which XML Schema elements are child elements.
Step 3: Create your XML Schema attributes.
Step 4: Create your XML Schema types to define the content of your elements
and attributes.
Step 5: Check your XML Schema to be sure XML elements and XML attributes
are properly named and that there are no other errors.
Step 6: Validate your XML Schema
Program:
[Link]
5
<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="[Link]
<xsd:element name="ugrads" type="uType">
<!-- student primary key -->
<xsd:key name="sPKey">
<xsd:selector xpath="student"/>
<xsd:field xpath="studentID"/>
</xsd:key>
<!-- enrollment foreign key -->
<xsd:keyref name="sFKey" refer="sPKey">
<xsd:selector xpath="enrollment"/>
<xsd:field xpath="studentID"/>
</xsd:keyref>
</xsd:element>
<!-- ugrads type -->
<xsd:complexType name="uType">
<xsd:sequence>
<xsd:element name="student" type="sType" maxOccurs="unbounded"/>
<xsd:element name="enrollment" type="eType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- student type -->
<xsd:complexType name="sType">
<xsd:sequence>
<xsd:element name="studentID" type="xsd:string"/>
<xsd:element name="name" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<!-- enrollment type -->
<xsd:complexType name="eType">
<xsd:sequence>
<xsd:element name="courseID" type="xsd:string"/>
<xsd:element name="studentID" type="xsd:string"/>
<xsd:element name="grade" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
6
</xsd:schema>
[Link]
<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="[Link]
<xsd:element name="gradCourses" type="gType">
<!-- course primary key -->
<xsd:key name="cPKey">
<xsd:selector xpath="course"/>
<xsd:field xpath="courseID"/>
</xsd:key>
</xsd:element>
<xsd:complexType name="gType">
<xsd:sequence>
<xsd:element name="course" type="cType" maxOccurs="unbounded">
<!-- student primary key -->
<xsd:key name="sPKey">
<xsd:selector xpath="student"/>
<xsd:field xpath="studentID"/>
</xsd:key>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="cType">
<xsd:sequence>
<xsd:element name="courseID" type="xsd:string"/>
<xsd:element name="title" type="xsd:string"/>
<xsd:element name="student" type="sType" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="sType">
<xsd:sequence>
<xsd:element name="studentID" type="xsd:string"/>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="grade" type="xsd:string"/>
</xsd:sequence>
7
</xsd:complexType>
</xsd:schema>
[Link]
<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="[Link]
<xsd:element name="students">
<xsd:complexType name="sType">
<xsd:sequence>
<xsd:element name="student" type="sType" maxOccurs="unbounded">
<!-- course primary key -->
<xsd:key name="cPKey">
<xsd:selector xpath="course" />
<xsd:field xpath="courseID" />
</xsd:key>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- student primary key -->
<xsd:key name="sPKey">
<xsd:selector xpath="student"/>
<xsd:field xpath="studentID"/>
</xsd:key>
</xsd:element>
<xsd:complexType name="sType">
<xsd:sequence>
<xsd:element name="studentID" type="xsd:string"/>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="type" type="myTypes"/>
<xsd:element name="course" type="cType" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="cType">
<xsd:sequence>
<xsd:element name="courseID" type="xsd:string"/>
8
<xsd:element name="title" type="xsd:string" minOccurs="0"/>
<xsd:element name="type" type="myTypes" minOccurs="0"/>
<xsd:element name="grade" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="myTypes">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="GRAD"/>
<xsd:enumeration value="UGRAD"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
[Link]
<students>{
(
for $us in doc("[Link]")/ugrads/student
let $usid := $us/studentID
return
<student>
<studentID>{ data($usid) }</studentID>
<name>{ data($us/name) }</name>
<type>UGRAD</type>
{(
for $gc in
doc("[Link]")/gradCourses/course[student/studentID=$usid]
let $cgrade := $gc/student[studentID = $usid]/grade
return
<course>
<courseID>{ data($gc/courseID) }</courseID>
<title>{ data($gc/title) }</title>
<type>GRAD</type>
<grade>{ data($cgrade) }</grade>
</course>
)
union
9
(
for $ue in doc("[Link]")/ugrads/enrollment[studentID = $usid]
where not(
some $courseID in
doc("[Link]")//course[student/studentID = $usid]/courseID
satisfies $ue/courseID = $courseID)
return
<course>
<courseID>data($ue/courseID)</courseID>
<type>UGRAD</type>
if (COUNT($ue/grade) > 0)
then <grade>{ data($ue/grade) }</grade>
</course>
)}
</student>
)
union
(
for $gsid in distinct-values(doc("[Link]")//student/studentID)
let $gs := doc("[Link]")//student[studentID = $gsid]
where not(some $usid in doc("[Link]")//student/studentID satisfies $gsid =
$usid)
return
<student>
<studentID>{ data($gsid) }</studentID>
<name>{ data($gs[1]/name) }</name>
<type>GRAD</type>
{
for $gc in doc("[Link]")//course[student/studentID = $gsid]
let $cgrade := $gc/student[studentID = $gsid]/grade
return
<course>
<courseID>{ data($gc/courseID) }</courseID>
<title>{ data($gc/title) }</title>
<type>GRAD</type>
<grade>{ data($cgrade) }</grade>
10
</course>
}
</student>
)
}</students>
Output:
Result:
Thus, the designing of XML schema for student information system was
designed and executed successfully.
Ex No: 8 Programs using JSON and Ajax
Aim:
To develop a program using Json and Ajax
Algorithm:
Step 1: Create a html file and placeholder to call ajax
11
Step 2: Create a JSON data file and save it with .json extension
Step 3: Make AJAX Call to Populate HTML Table with JSON Data
Step 4: Display JSON Data in HTML Table using Javascript & AJAX
Program:
[Link]
<h1 id="title"></h1>
<hr>
<div id="text"></div>
<script src="[Link]"></script>
Program:
[Link]
function ajax_get(url, callback) {
var xmlhttp = new XMLHttpRequest();
[Link] = function() {
if ([Link] == 4 && [Link] == 200) {
[Link]('responseText:' + [Link]);
try {
var data = [Link]([Link]);
} catch(err) {
[Link]([Link] + " in " + [Link]);
return;
}
callback(data);
}
};
[Link]("GET", url, true);
[Link]();
}
ajax_get('[Link]', function(data) {
[Link]("title").innerHTML = data["title"];
var html = "<h2>" + data["title"] + "</h2>";
html += "<h3>" + data["description"] + "</h3>";
12
html += "<ul>";
for (var i=0; i < data["articles"].length; i++) {
html += '<li><a href="' + data["articles"][i]["url"] + '">' + data["articles"][i]["title"]
+ "</a></li>";
}
html += "</ul>";
[Link]("text").innerHTML = html;
});
[Link]
{
"title" : "P A College of Engineering and Technology",
"description" : "Creating a New Innovation",
"articles" : [
{
"title" : "PACET - About us",
"url" : "[Link]
},
{
"title" : "Department of Computer Science and Engineering",
"url" : "[Link]
}
]
}
Output:
13
14
Result:
15
Thus, the program using json and ajax has been developed and executed
successfully.
Ex No: 9 Designing web applications in Net Beans Environment
Aim:
To design a web application in NetBeans environment.
Procedure:
Step 1: Open Netbeans IDE, Select File -> New Project
Step 2: Select Java Web -> Web Application, then click on Next,
16
Step 3: Give a name to your project and click on Next, and then, Click Finish
Step 4: The complete directory structure required for the Servlet Application will
be created automatically by the IDE.
17
Step 5: To create a Servlet, open Source Package, right click on default packages
-> New -> Servlet.
18
Step 6: Give a Name to your Servlet class file,
Step 7: Now, your Servlet class is ready, and you just need to change the method
definitions and can write out code inside Servlet class.
19
Step 8: Create an HTML file, right click on Web Pages -> New -> HTML
20
Step 9: Give it a name. We recommend you to name it index, because browser
will always pick up the [Link] file automatically from a directory. Index file is
read as the first page of the web application.
Step 10: Write some code inside your HTML file. We have created a hyperlink to
our Servlet in our HTML file.
21
Step 11: Edit [Link] file. In the [Link] file you can see, we have specified the
url-pattern and the servlet-name, this means when logout, profile url is accessed
our Servlet file will be executed.
22
Step 12: Run your application, right click on your Project and select Run
Step 13: Click on the link created, to open your Servlet.
23
24
[Link]
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Servlet Login Example</title>
</head>
<body>
<h1>Login App using HttpSession</h1>
<a href="[Link]">Login</a>|
<a href="LogoutServlet">Logout</a>|
25
<a href="ProfileServlet">Profile</a>
</body>
</html>
[Link]
<a href="[Link]">Login</a> |
<a href="LogoutServlet">Logout</a> |
<a href="ProfileServlet">Profile</a>
<hr>
[Link]
<form action="LoginServlet" method="post">
Name:<input type="text" name="name"><br>
Password:<input type="password" name="password"><br>
<input type="submit" value="login">
</form>
[Link]
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class LoginServlet extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
[Link]("text/html");
PrintWriter out=[Link]();
[Link]("[Link]").include(request, response);
26
String name=[Link]("name");
String password=[Link]("password");
if([Link]("admin123")){
[Link]("Welcome, "+name);
HttpSession session=[Link]();
[Link]("name",name);
}
else{
[Link]("Sorry, username or password error!");
[Link]("[Link]").include(request, response);
}
[Link]();
}
}
[Link]
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class LogoutServlet extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
[Link]("text/html");
PrintWriter out=[Link]();
[Link]("[Link]").include(request, response);
HttpSession session=[Link]();
[Link]();
27
[Link]("You are successfully logged out!");
[Link]();
}
}
[Link]
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class ProfileServlet extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
[Link]("text/html");
PrintWriter out=[Link]();
[Link]("[Link]").include(request, response);
HttpSession session=[Link](false);
if(session!=null){
String name=(String)[Link]("name");
[Link]("Hello, "+name+" Welcome to Profile");
}
else{
[Link]("Please login first");
[Link]("[Link]").include(request, response);
}
[Link]();
}
}
28
[Link]
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="[Link]
xmlns="[Link]
xsi:schemaLocation="[Link]
[Link] id="WebApp_ID"
version="2.5">
<servlet>
<description></description>
<display-name>LoginServlet</display-name>
<servlet-name>LoginServlet</servlet-name>
<servlet-class>LoginServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>LoginServlet</servlet-name>
<url-pattern>/LoginServlet</url-pattern>
</servlet-mapping>
<servlet>
<description></description>
<display-name>ProfileServlet</display-name>
<servlet-name>ProfileServlet</servlet-name>
<servlet-class>ProfileServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ProfileServlet</servlet-name>
<url-pattern>/ProfileServlet</url-pattern>
</servlet-mapping>
<servlet>
<description></description>
<display-name>LogoutServlet</display-name>
<servlet-name>LogoutServlet</servlet-name>
<servlet-class>LogoutServlet</servlet-class>
</servlet>
<servlet-mapping>
29
<servlet-name>LogoutServlet</servlet-name>
<url-pattern>/LogoutServlet</url-pattern>
</servlet-mapping>
</web-app>
Result:
Thus, the development of web application using netbeans environment
has been designed and executed successfully.
Ex No: 10 Database Connectivity with MySQL using Java Servlets, JSP, and
PHP
30
Aim
To create a Database Connectivity with MySQL using Java Servlets, JSP,
and PHP.
Algorithm for Java Servlet with MySQL:
Step 1: Proper JDBC Environment should set-up along with database creation.
Step 2: To do so, download the [Link] file from the internet,
Step 3: As it is downloaded, move the jar file to the apache-tomcat server folder,
Step 4: Place the file in lib folder present in the apache-tomcat directory.
Step 5: To start with the basic concept of interfacing:
Step 5.1: Creation of Database and Table in MySQL
Step 5.2: Implementation of required Web-pages
Step 5.3: Creation of Java Servlet program with JDBC Connection
Step 5.4: To use this class method, create an object in Java Servlet
program
Step 5.5: Get the data from the HTML file
Program:
[Link]
<!DOCTYPE html>
<html>
<head>
<title>Insert Data</title>
</head>
<body>
<!-- Give Servlet reference to the form as an instances
GET and POST services can be according to the problem statement-->
<form action="./InsertData" method="post">
<p>ID:</p>
<!-- Create an element with mandatory name attribute,
so that data can be transfer to the servlet using getParameter() -->
<input type="text" name="id"/>
<br/>
<p>String:</p>
<input type="text" name="string"/>
<br/><br/><br/>
31
<input type="submit"/>
</form>
</body>
</html>
[Link]
import [Link];
import [Link];
import [Link];
// This class can be used to initialize the database connection
public class DatabaseConnection {
protected static Connection initializeDatabase()
throws SQLException, ClassNotFoundException
{
// Initialize all the information regarding
// Database Connection
String dbDriver = "[Link]";
String dbURL = "jdbc:mysql:// localhost:3306/";
// Database name to access
String dbName = "demoprj";
String dbUsername = "root";
String dbPassword = "root";
[Link](dbDriver);
Connection con = [Link](dbURL +
dbName,dbUsername,dbPassword);
return con;
}
}
[Link]
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
32
import [Link];
import [Link];
import [Link];
import [Link];
// Import Database Connection Class file
import [Link];
// Servlet Name
@WebServlet("/InsertData")
public class InsertData extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
try {
// Initialize the database
Connection con = [Link]();
// Create a SQL query to insert data into demo table
// demo table consists of two columns, so two '?' is used
PreparedStatement st = con
.prepareStatement("insert into demo values(?, ?)");
// For the first parameter,
// get the data using request object
// sets the data to st pointer
[Link](1, [Link]([Link]("id")));
// Same for second parameter
[Link](2, [Link]("string"));
// Execute the insert command using executeUpdate()
// to make changes in database
[Link]();
// Close all the connections
[Link]();
[Link]();
// Get a writer pointer
// to display the successful result
PrintWriter out = [Link]();
33
[Link]("<html><body><b>Successfully Inserted"
+ "</b></body></html>");
}
catch (Exception e) {
[Link]();
}
}
}
Output:
34
Algorithm for JSP with MySQL:
Step 1: Proper JDBC Environment should set-up along with database creation.
Step 2: To do so, download the [Link] file from the internet,
Step 3: As it is downloaded, move the jar file to the apache-tomcat server folder,
Step 4: Place the file in lib folder present in the apache-tomcat directory.
Step 5: To start with the basic concept of interfacing:
Step 5.1: Creation of Database and Table in MySQL
Step 5.2: Implementation of required Web-pages
Step 5.3: Creation of JSP program with JDBC Connection
Step 5.4: Get the data from the HTML file
Program:
jsp_sql.jsp
<%@page import="[Link]"%>
<%@page import="[Link]"%>
<%@page import="[Link]"%>
<%@page import="[Link]"%>
<%
String id = [Link]("userid");
String driver = "[Link]";
String connectionUrl = "jdbc:mysql://localhost:3306/";
String database = "test";
String userid = "root";
String password = "";
try {
[Link](driver);
} catch (ClassNotFoundException e) {
[Link]();
}
Connection connection = null;
Statement statement = null;
35
ResultSet resultSet = null;
%>
<!DOCTYPE html>
<html>
<body>
<h1>Retrieve data from database in jsp</h1>
<table border="1">
<tr>
<td>first name</td>
<td>last name</td>
<td>City name</td>
<td>Email</td>
</tr>
<%
try{
connection =
[Link]("jdbc:mysql://localhost:3306/student", "root", "");
statement=[Link]();
String sql ="select * from users";
resultSet = [Link](sql);
while([Link]()){
%>
<tr>
<td><%=[Link]("first_name") %></td>
<td><%=[Link]("last_name") %></td>
<td><%=[Link]("city_name") %></td>
<td><%=[Link]("email") %></td>
</tr>
<%
}
[Link]();
} catch (Exception e) {
[Link]();
}
36
%>
</table>
</body>
</html>
Output:
Algorithm for PHP with MySQL:
Step 1: Configure the Xampp server by start the Apache and MySql (download
“xampp-32-bit”).
Step 2: Call a [Link] file with the values create, insert, filter display and
update.
Step 3: Execute the query and create database name and table name.
Step 4: Add the multiple rows into the table.
Step 5: Update the table and display.
Location:
C:\xampp\htdocs\10. php with mysql
Chrome Location: [Link] php with mysql
Program
[Link]
<!DOCTYPE html>
37
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Add Record Form</title>
</head>
<body>
<form action="[Link]" method="post">
<input type="submit" value="create">
</form>
<form action="[Link]" method="post">
<input type="submit" value="Insert">
</form>
<form action="[Link]" method="post">
<input type="submit" value="Filter & Display">
</form>
<form action="[Link]" method="post">
<input type="submit" value="Update">
</form>
</body>
</html>
[Link]
<?php
$link = mysqli_connect("localhost", "root", "");
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
$sql = "CREATE DATABASE pacse1";
if(mysqli_query($link, $sql)){
echo "Database created successfully";
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
mysqli_close($link);
?>
[Link]
38
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Add Record Form</title>
</head>
<body>
<form action="[Link]" method="post">
<p>
<label for="LabName">Lab Name:</label>
<input type="text" name="lab_name" id="LabName">
</p>
<p>
<label for="deptName">Department Name:</label>
<input type="text" name="dept_name" id="deptName">
</p>
<p>
<label for="palce">Place</label>
<input type="text" name="place" id="place">
</p>
<input type="submit" value="Submit">
</form>
</body>
</html>
[Link]
<?php
$link = mysqli_connect("localhost", "root", "", "pacet_cse");
if($link === false)
{
die("ERROR: Could not connect. " . mysqli_connect_error());
}
$sql = "SELECT * FROM wp_lab WHERE dept_name='cse'";
if($result = mysqli_query($link, $sql)){
if(mysqli_num_rows($result) > 0){
39
echo "<table>";
echo "<tr>";
echo "<th>id</th>";
echo "<th>lab_name</th>";
echo "<th>dept_name</th>";
echo "<th>place</th>";
echo "</tr>";
while($row = mysqli_fetch_array($result)){
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['lab_name'] . "</td>";
echo "<td>" . $row['dept_name'] . "</td>";
echo "<td>" . $row['place'] . "</td>";
echo "</tr>";
}
echo "</table>";
// Close result set
mysqli_free_result($result);
} else{
echo "No records matching your query were found.";
}
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
mysqli_close($link);
?>
[Link]
<?php
$link = mysqli_connect("localhost", "root", "", "pacet_cse");
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
$sql = "UPDATE wp_lab SET place='coimbatore1' WHERE id=20";
if(mysqli_query($link, $sql)){
40
echo "Records were updated successfully.";
} else {
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
mysqli_close($link);
?>
Output:
Xampp Server:
41
42
43
Result:
44
Thus, the database connectivity with MySql using Java Servlets, JSP and
PHP was implemented and executed successfully.
45