0% found this document useful (0 votes)
47 views

Web Engineering: Presentation

This presentation discusses connecting a PHP web application to a MySQL database. It provides 7 steps to set up the database connection in XAMPP: 1) Start Apache and MySQL, 2) Open localhost/xampp, 3) Click PHPMyAdmin, 4) Create a database, 5) Make tables and columns, 6) Fill in data, 7) Connect PHP to the database. It then shows code for a front-end HTML form to collect student data and a back-end PHP file that connects to the database using mysqli_connect to insert the submitted data. The presentation demonstrates how to build a simple student registration system with a database backend.

Uploaded by

Shani DK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Web Engineering: Presentation

This presentation discusses connecting a PHP web application to a MySQL database. It provides 7 steps to set up the database connection in XAMPP: 1) Start Apache and MySQL, 2) Open localhost/xampp, 3) Click PHPMyAdmin, 4) Create a database, 5) Make tables and columns, 6) Fill in data, 7) Connect PHP to the database. It then shows code for a front-end HTML form to collect student data and a back-end PHP file that connects to the database using mysqli_connect to insert the submitted data. The presentation demonstrates how to build a simple student registration system with a database backend.

Uploaded by

Shani DK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Web Engineering

Presentation
Topics:
Database connectivity

Data insertion
Database Connectivity
• First we know how to make database then we able
to connect the database with php
• To Connect the php with database we have
certain steps.
Step1:
• Open the Xampp/Wamp Control Panel.
Step1:
• Start the Apache and MySQL.
Step 3:
• After star the Apache and MySQL then open the
Mozila firefox or Google Chrome and type this
• Localhost/xampp/
Step 4:
• When you enter the localhost/xampp/.
• Then the main page of Xampp will open like this.
Step 5:
• Now click on phyMyAdmin.
• When you click on phyMyAdmin then you see like
page this
Step 6:
• Now click on database and create the database
like this.
Step 7:
• After creating the database next step is make the
table and set the no. of columns.
• And click on go
Step 8:
• Fill the data like this
Php and Database Connectivity
• So by followings the above steps we make our
database.

• After making the database we have to connect


php with databas.

• The open notepad++ or simple notepadd and start


coding and connect to php which we will tell you in
the upcoming slides.
• We make a data base of school in which we enter
the information of students.

• To just understand you the whole process.

• For this we first made the database in my sql


• After making our database we make the two
notepad files .
• Make the notepad

• One is in html that is front-end.

• And other is in php which is back end



Front-end html class
<html>

<head>

<title> School Data </title>

</head>

<body>

<form action="sup.php" method="post">

<table width="600" border="6" align="center">

<tr>
<td bgcolor="green" colspan="6">
<h1>Students Registration</h1>
</td>

</tr>
<tr>

<td>Studend name</td>
<td><input type="text" name="sname"/></td>

</tr>

<tr>

<td>Section</td>
<td><input type="text" name="section"/> </td>

</tr>

<tr>

<td>roll no </td>
<td><input type="text" name="roll_no"/> </td>

</tr>
<tr>

<td>school name</td>
<td><input type="text" name="school_name"/> </td>

</tr>

<tr>

<td>result</td>
<td><input type="text" name="result"/> </td>

</tr>

<tr>

<td>Submit</td>
<td><input type="submit" name="submit" value="submit"/> </td>

</tr>
</form>
</body>

</html>
• This html class is our front-end class which is appear
on web page in which we enter the student data
and submit.
• We made the html file which is front-end and
appear on the web page and insert the data data
of student .

• But we still can’t connect to the mysql dataabse to


connect to database we make annother file of
notepad of php type in which we connect to
database.

• In the next slide we will show you our php code who
is connect to mysql data base
• To Connect to database we have to write the
syntax like this.

• $con = mysqli_connect("localhost","root","","school1");

• In above syntax loclahosht and root is our path and school1 is


our db name.

• We will show you more by our db which we made.


• Now fill the form and submit it and your data will
insert into your db.
• You can also edit and delete the database data .

You might also like