You are on page 1of 22

SOUTHERN LEYTE

STATE UNIVERSITY

COLLEGE OF COMPUTER STUDIES AND


INFORMATION TECHNOLOGY
Main Campus, Sogod Southern Leyte

IT 318 – WEB DEVELOPMENT

MODULE 2 PHP FORMS & MYSQL DATABASE

JOHN REY C. CABASISI


Module 2
IT 318 Web Development
Course Overview

Course No. N/A


Course Code IT 318
Descriptive Title Web Development
Credit Units 3
School Year 2021-2022
Mode of Delivery Synchronous/Asynchronous
Name of Instructor John Rey C. Cabasisi
Course Description This course introduces the student to PHP scripting language that is
embedded in HTML that allows them to create a dynamic content
website that interacts with database. It also introduces one of the
widely used cross platform web servers, which helps them to create
and test their programs locally.
Course Outcomes (Think)
Analyze PHP Language to communicate connections to MySQL
database

(Do)
Build a dynamic website using PHP and MySQL

(Feel)
Justify best practices and approaches when using PHP Scripting
Language

SLSU Vision A high-quality corporate university of Science, Technology and


Innovation.

SLSU Mission SLSU will:

a. Develop Science, Technology and Innovation leaders and


professionals;

b. Produce high-impact technologies from research and


innovations;

c. Contribute to sustainable development through


responsive community engagement programs;

d. Generate revenues to be self-sufficient and financially-


viable;

1 SLSU CCSIT
MAIN CAMPUS
Module ssGuide
We learned how to properly set up XAMPP local server in our system in the previous module. We
also successfully created a simple php file on our local server. We went over the basic syntax and
semantics of the PHP scripting language, including operators, conditional statements, and other
features that enable you do simple outputs.

We'll use our XAMPP local server to create a database and a table in this module. We'll use PHP to
manipulate the data in our database, such as selecting, inserting, updating, and deleting it. We'll also
talk about PHP forms, which we'll use to store data in our database and execute security checks
while processing them.

Instructions for submission:


 Make a document out of your codes and a screen shot of your outputs.
 Submit all of your documents to our Google Classroom.

Here’s my contact details if ever you have questions regarding the module or the subject:

Facebook name: John Rey C. Cabasisi


Email: cabasisijohnrey@gmail.com

By the end of this lesson you should be able to:


 Adapt php form handling and security
 Demonstrate connection to MYSQL database
 Demonstrate CRUD using php and MySQL

Lesson 1 – PHP Forms


Introduction
In this session, we'll concentrate on how to use PHP forms and how to validate form input,
which is critical for keeping your form safe from hackers and spammers. Because you already know
and understand HTML Forms, you should have no trouble adapting. You presumably already know
how to make these forms, so we'll try using PHP forms to collect input fields and save them in the
database. We'll also look at the PHP MySQL Database so that we can connect and edit the database's
data.

PHP Form Handling


The most important thing to notice when dealing with HTML forms and PHP is that any form
element in an HTML page will automatically be available to your PHP scripts.

The PHP superglobals $_GET and $_POST are used to collect form-data.

PHP - A Simple HTML Form


The example below displays a simple HTML form with two input fields and a submit button:

2 SLSU CCSIT
MAIN CAMPUS
You have to make two separate files index.php for our forms and -
Example

<!DOCTYPE HTML>
<html>  
<body>

<form action="welcome.php" method="post">
Name: <input type="text" name="name"><br><br>
E-mail: <input type="text" name="email"><br>
<input type="submit">
</form>

</body>
</html>

When the user fills out the form above and clicks the submit button, the form data is sent for
processing to a PHP file named "welcome.php". The form data is sent with the HTTP POST method.

To display the submitted data you could simply echo all the variables. The "welcome.php" looks
like this:

<html>
<body>

Welcome <?php echo $_POST["name"]; ?><br>


Your email address is: <?php echo $_POST["email"]; ?>

</body>
</html>

The output could be something like this:

Welcome John
Your email address is john.doe@example.com

The same result could also be achieved using the HTTP GET method:

<html>
<body>

<form action="welcome_get.php" method="get">
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br>
<input type="submit">
</form>

3 SLSU CCSIT
MAIN CAMPUS
</body>
</html>

and "welcome.php" looks like this:

<html>
<body>

Welcome <?php echo $_GET["name"]; ?><br>


Your email address is: <?php echo $_GET["email"]; ?>

</body>
</html>

The code above is quite simple. However, the most important thing is missing. You need to validate
form data to protect your script from malicious code.

Think SECURITY when processing PHP forms!


This page does not contain any form validation, it just shows how you can send and retrieve form
data.
However, the next pages will show how to process PHP forms with security in mind! Proper
validation of form data is important to protect your form from hackers and spammers!

GET vs. POST


Both GET and POST create an array (e.g. array( key1 => value1, key2 => value2, key3 => value3, ...)).
This array holds key/value pairs, where keys are the names of the form controls and values are the
input data from the user.
Both GET and POST are treated as $_GET and $_POST. These are superglobals, which means that
they are always accessible, regardless of scope - and you can access them from any function, class
or file without having to do anything special.
$_GET is an array of variables passed to the current script via the URL parameters.
$_POST is an array of variables passed to the current script via the HTTP POST method.

When to use GET?


Information sent from a form with the GET method is visible to everyone (all variable names and
values are displayed in the URL). GET also has limits on the amount of information to send. The
limitation is about 2000 characters. However, because the variables are displayed in the URL, it is
possible to bookmark the page. This can be useful in some cases.
GET may be used for sending non-sensitive data.

Note: GET should NEVER be used for sending passwords or other sensitive information!
When to use POST?

4 SLSU CCSIT
MAIN CAMPUS
Information sent from a form with the POST method is invisible to others (all names/values are
embedded within the body of the HTTP request) and has no limits on the amount of information to
send.
Moreover POST supports advanced functionality such as support for multi-part binary input while
uploading files to server.
However, because the variables are not displayed in the URL, it is not possible to bookmark the
page.

Developers prefer POST for sending form data.

PHP Form Validation


Think SECURITY when processing PHP forms!

These pages will show how to process PHP forms with security in mind. Proper validation of
form data is important to protect your form from hackers and spammers!

What is Validation ?
Validation means check the input submitted by the user. There are two types of validation are
available in PHP. They are as follows −
 Client-Side Validation − Validation is performed on the client machine web browsers.
 Server Side Validation − After submitted by data, The data has sent to a server and
perform validation checks in server machine.

Some of Validation rules for field

Field Validation Rules


Name Should required letters and white-spaces
Email Should required @ and .
Website Should required a valid URL
Radio Must be selectable at least once
Check Box Must be checkable at least once
Drop Down menu Must be selectable at least once

Valid URL
Below code shows validation of URL

$website = input($_POST["site"]);

5 SLSU CCSIT
MAIN CAMPUS
if (!preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/
%=~_|]/i",$website)) {
$websiteErr = "Invalid URL";
}
Above syntax will verify whether a given URL is valid or not. It should allow some keywords as
https, ftp, www, a-z, 0-9,..etc..

Valid Email
Below code shows validation of Email address

$email = input($_POST["email"]);

if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$emailErr = "Invalid format and please re-enter valid email";
}
Above syntax will verify whether given Email address is well-formed or not.if it is not, it will show
an error message

Example

The HTML form we will be working at in these chapters, contains various input fields: required and
optional text fields, and a submit button.

Below example shows the form with some specific actions by using post method and shows the
form with required field validation .

Step 1-Create a HTML Form and save it as Registration.php. After, add another file named
Validation.php

Registration.php will serve as our design for our form and will look like this:

<!DOCTYPE html>
<html>
<head><title>Registration</title></head>
<style>
.button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;

6 SLSU CCSIT
MAIN CAMPUS
margin: 4px 2px;
cursor: pointer;
padding: 10px 24px;
}
.error {
color: red;
}
</style>
<body>

<?php
// define variables and set to empty values
$nameErr = $emailErr = $genderErr = $ageErr = "";
$name = $email = $gender = $comment = $age = "";
//check if empty inputs
if($_POST['name'] == "" || $_POST['email'] == "" ||
$_POST['age'] == "" || $_POST['gender'] == "")
{
//perform php include
include 'Validation.php';
echo "<p>Input field Required</p>";
}
else
{
echo "<p>Input Validated</p>";
}
?>
<h1>REGISTRATION</h1>
<p><span class = "error">* required field.</span></p>
<form method="post" action="<?php
echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
<table>
<tr>
<td>Name:</td>
<td><input type="text" name="name">
<span class = "error">* <?php echo $nameErr;?></span></td></tr>
<tr>
<td>Email:</td>
<td><input type="text" name="email">
<span class = "error">* <?php echo $emailErr;?></span></td></tr>
<tr>
<td>Age</td>
<td><input type="number" name="age">
<span class = "error">* <?php echo $ageErr;?></span></td></tr>
<tr>
<td>Comment</td>
<td><textarea name="comment" rows="5" cols="40"></textarea>
<td></tr>
<tr>
<td>Gender:</td>

7 SLSU CCSIT
MAIN CAMPUS
<td><select name ="gender">
<option></option>
<option>Male</option>
<option>Female</option>
</select>
<span class = "error">* <?php echo $genderErr;?></span></td></tr>
</table>
<input class="button" type="submit" name="submit" value="Submit">
<a class="button" href="List.php">LIST</a>
</form>
</body>
</html>

What is PHP Include Files?


The include (or require) statement takes all the text/code/markup that exists in the specified file
and copies it into the file that uses the include statement.

Including files is very useful when you want to include the same PHP, HTML, or text on multiple
pages of a website.

What is the htmlspecialchars() function?

The htmlspecialchars() function converts special characters to HTML entities. This means that it
will replace HTML characters like < and > with &lt; and &gt;. This prevents attackers from
exploiting the code by injecting HTML or Javascript code (Cross-site Scripting attacks) in forms.

Validate Form Data With PHP


The first thing we will do is to pass all variables through PHP's htmlspecialchars() function.
When we use the htmlspecialchars() function; then if a user tries to submit the following in a text
field:
<script>location.href('http://www.hacked.com')</script>
- this would not be executed, because it would be saved as HTML escaped code, like this:
&lt;script&gt;location.href('http://www.hacked.com')&lt;/script&gt;
The code is now safe to be displayed on a page or inside an e-mail.

We will also do two more things when the user submits the form:
1. Strip unnecessary characters (extra space, tab, newline) from the user input data (with the
PHP trim() function)
2. Remove backslashes (\) from the user input data (with the PHP stripslashes() function)

The next step is to create a function that will do all the checking for us (which is much more
convenient than writing the same code over and over again).

We will name the function test_input(). Now, we can check each $_POST variable with the
test_input() function, and the script looks like this:

8 SLSU CCSIT
MAIN CAMPUS
Step 2 – Validation.php file. This php file will be used to validate the data. It will look like this:
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST["name"])) {
$nameErr = "Name is required";
}else {
$name = test_input($_POST["name"]);
}
if (empty($_POST["email"])) {
$emailErr = "Email is required";
}else {
$email = test_input($_POST["email"]);

// check if e-mail address is well-formed


if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$emailErr = "Invalid email format";
}
}
if (empty($_POST["age"])) {
$ageErr = "Age is required";
}else {
$website = test_input($_POST["age"]);
}
if (empty($_POST["comment"])) {
$comment = "";
}else {
$comment = test_input($_POST["comment"]);
}
if (empty($_POST["gender"])) {
$genderErr = "Gender is required";
}else {
$gender = test_input($_POST["gender"]);
}
}
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>
It will produce the following result −

9 SLSU CCSIT
MAIN CAMPUS
Summary
We learned how PHP Forms manage data in this lesson, and we practiced how to properly
check our form input for security. We now know what the most effective strategy for securing
this.

Exercise 1

Make a PHP form that validates inputs and requires them. A minimum of 3 any input fields..

Lesson 2 – Create database and Table in XAMMP


Step 1 – Go to your browser and enter localhost/phpMyAdmin and select Databases.

Step 2 – Create Database Registration. Once you select create, your new database will appear in
the Database list.

10SLSU CCSIT
MAIN CAMPUS
Step 3 – Select your new Registration database and you can now create a table. Create Register
table then select Go.

Step 4 – Once Register table is created


you can now fill out the table. Will enable A.I (Auto Increment) as our table id. Then Save. After that
Registration table is created and select Structure to confirm this.

Step 5 – Lastly go to privileges in order for us to know what is our server name or host name,
username and the password for our connections.

11SLSU CCSIT
MAIN CAMPUS
Lesson – 3 PHP Connect to MySQL
PHP 5 and later can work with a MySQL database using:

 MySQLi extension (the "i" stands for improved)


 PDO (PHP Data Objects)

Earlier versions of PHP used the MySQL extension. However, this extension was deprecated in
2012.

Note: We will use PDO mostly in the examples.

Should I Use MySQLi or PDO?


If you need a short answer, it would be "Whatever you like". Both MySQLi and PDO have their
advantages:

PDO will work on 12 different database systems, whereas MySQLi will only work with MySQL
databases. So, if you have to switch your project to use another database, PDO makes the process
easy. You only have to change the connection string and a few queries. With MySQLi, you will need
to rewrite the entire code - queries included.

Both are object-oriented, but MySQLi also offers a procedural API. Both support Prepared
Statements. Prepared Statements protect from SQL injection, and are very important for web
application security.

Step 1-Let's start by creating a new file Connection.php to connect to our database. We're going
to split this out so that we don't have to duplicate the codes. Let's just use php include to make this
work with any file.

Connection.php should look like this:

12SLSU CCSIT
MAIN CAMPUS
<?php
// refer to your own privileges
$servername = "localhost";
$username = "root";
$password = "";
try {
  $conn = new PDO("mysql:host=$servername;dbname=Registration", $username, $password);
  // set the PDO error mode to exception
  $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  echo "Connected successfully";

} catch(PDOException $e) {
  echo "Connection failed: " . $e->getMessage();
}
?>

Note: In the PDO example above we have also specified a database (Registration). PDO require a
valid database to connect to. If no database is specified, an exception is thrown.

Tip: A great benefit of PDO is that it has an exception class to handle any problems that may occur
in our database queries. If an exception is thrown within the try{ } block, the script stops executing
and flows directly to the first catch(){ } block.

Close the Connection


The connection will be closed automatically when the script ends. To close the connection before,
use the following:

PDO:
$conn = null;

Summary
We learnt how to use XAMPP to establish a database and a database table in this course. We also
understand how we can use PHP to interface with a MySQL database. "Connected Successfully"
should now appear, indicating that we have successfully connected our PHP to MySQL

Lesson 4 – Insert Data

Insert Data Into MySQL Using PDO


After a database and a table have been created, we can start adding data in them.

Here are some syntax rules to follow:


 The SQL query must be quoted in PHP
 String values inside the SQL query must be quoted
 Numeric values must not be quoted
 The word NULL must not be quoted

13SLSU CCSIT
MAIN CAMPUS
The INSERT INTO statement is used to add new records to a MySQL table:
INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...)

We are now going to store the inputted data in the input fields provided. So, first let’s create a new
files named Index.php as our form for inputting data and Add.php that will now save this data..

Step 1 – Let's start by making a simple form design in Index.php, and then passing the data to
Add.php using POST Method. It will now appear as follows:
<!DOCTYPE html>
<html>
<head><title>Registration</title></head>
<style>
.button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
padding: 10px 24px;
}
</style>
<body>
<h1>REGISTRATION</h1>
<form method="post" action="Add.php">
<table>
<tr>
<td>Name:</td>
<td><input type="text" name="name">
</td></tr>
<tr>
<td>Email:</td>
<td><input type="text" name="email">
</td></tr>
<tr>
<td>Age</td>
<td><input type="number" name="age">
</td></tr>
<tr>
<td>Comment</td>
</textarea>
<td></tr>
<tr>
<td>Gender:</td>
<td><select name ="gender">

14SLSU CCSIT
MAIN CAMPUS
<option></option>
<option>Male</option>
<option>Female</option>
</select>
</td></tr>
</table>
<input class="button" type="submit" name="submit" value="Submit">
<a class="button" href="List.php">LIST</a>
</form>
</body>
</html>

Step 2 – Let us now save the inputted data from Index.php to Add.php. We will also include
Connection.php for our database connection, it will look like this,
<?php
//include Connection.php to provide connection
include 'Connection.php';
$name = $_POST['name'];
$email = $_POST['email'];
$age = $_POST['age'];
$comment = $_POST['comment'];
$gender = $_POST['gender'];
//insert to register table
$sql = "INSERT INTO Register (Name, Email, Age, Comment, Gender)
VALUES ('$name', '$email', $age, '$comment', '$gender')";
// use exec() because no results are returned
$conn->exec($sql);
echo "New record inserted successfully";
echo $name;
echo $email;
echo $age;
echo $comment;
echo $gender;
?>

The output should look like this:

If “New record is created successfully” you should be able to see your inserted data in your
database table Register.

15SLSU CCSIT
MAIN CAMPUS
Lesson 5 – Select/Retrieve Data

Select Data From a MySQL Database


The SELECT statement is used to select data from one or more tables:

SELECT column_name(s) FROM table_name

or we can use the * character to select ALL columns from a table:

SELECT * FROM table_name

Now we’re going to retrieve or display all the data that we inserted in our database. First make
another file named List.php.

List.php will look like this:


<?php
//including the database connection file
include 'Connection.php';
// select all data to the database
$stmt = $conn->prepare("SELECT id, Name, Email, Age, Comment, Gender
FROM Register");
$stmt->execute();
// set the resulting array to associative
$results = $stmt->fetchAll(PDO::FETCH_ASSOC);
?>
<html>
<head>
<title>List</title>
</head>
<body>
<a href="Index.php">Go To Registration</a>
<h2>List</h2>
<table width='100%' border=1>
<tr bgcolor='#CCCCCC'>
<td>id</td>
<td>Name</td>
<td>Email Address</td>
<td>Age</td>
<td>Comment</td>
<td>Gender</td>
<td>Action</td>

16SLSU CCSIT
MAIN CAMPUS
</tr>
<?php foreach ($results as $result): ?>
<tr>
<td><?=$result['id']?></td>
<td><?=$result['Name']?></td>
<td><?=$result['Email']?></td>
<td><?=$result['Age']?></td>
<td><?=$result['Comment']?></td>
<td><?=$result['Gender']?></td>
<td>
<div style="display:flex">
<form action="Update.php" method="Get">
<input type="hidden" name="id" value="<?= $result['id'] ?>">
<button type="submit"Update>Update</button>
</form>
<form action="Delete.php" method="post">
<input type="hidden" name="id" value="<?= $result['id'] ?>">
<button type="submit">Delete</button>
</form>
</div>
</td>
</tr>
<?php endforeach; ?>
</table>
</body>
</html>

The output should look like this:

Exercise 2
 Write a PHP program that will save inputted data to the database and,
 Display all the data that is stored in the database table.

Lesson 6 – Update Data


Update Data In a MySQL Table Using PDO

The UPDATE statement is used to update existing records in a table:

UPDATE table_name
SET column1=value, column2=value2,...

17SLSU CCSIT
MAIN CAMPUS
WHERE some_column=some_value 

Notice the WHERE clause in the UPDATE syntax: The WHERE clause specifies which record or
records that should be updated. If you omit the WHERE clause, all records will be updated!
Create a new file called Update.php to get started. First and foremost, we'll need to retrieve our
data. The next step is to create a form that allows the user to edit the data, and then we'll update the
data and route it to List.php. Update.php should look like this:
<?php
//retrieve data
include_once 'Connection.php';
$id = $_GET['id'];
$stmt = $conn->prepare("SELECT id, Name, Email, Age, Comment, Gender
FROM Register WHERE id = $id");
$stmt->execute();
// set the resulting array to associative
$results = $stmt->fetch(PDO::FETCH_ASSOC);
?>
<!DOCTYPE html>
<html>
<head><title>Registration</title></head>
<style>
.button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
padding: 10px 24px;
}
</style>
<body>
<h1>UPDATE DATA</h1>
<form method="post" action="">
<table>
<tr>
<td>Name:</td>
<td><input type="text" name="name" value="<?=$results['Name']?>">
</td></tr>
<tr>
<td>Email:</td>
<td><input type="text" name="email" value="<?=$results['Email']?>">
</td></tr>
<tr>
<td>Age</td>

18SLSU CCSIT
MAIN CAMPUS
<td><input type="number" name="age" value="<?=$results['Age']?>">
</td></tr>
<tr>
<td>Comment</td>
<td><textarea name="comment"><?=$results['Comment'] ?></textarea></td></tr>
<tr>
<td>Gender:</td>
<td><select name ="gender">
<option><?=$results['Gender'] ?></option>
<option>Male</option>
<option>Female</option>
</select>
</td></tr>
</table>
<input class="button" type="submit" name="submit" value="Update">
<a class="button" href="List.php">LIST</a>
</form>
<?php
//update data
if (isset($_POST['submit']))
{
$name = $_POST['name'];
$email = $_POST['email'];
$age = $_POST['age'];
$comment = $_POST['comment'];
$gender = $_POST['gender'];

$stmt = $conn->prepare("UPDATE Register SET Name = '$name', Email = '$email',


Age = $age, Comment = '$comment', Gender = '$gender' WHERE id = '$id'");
$stmt->execute();
header("Location: List.php?msg=Updated successfully");
}
?>
</body>
</html>

Lesson 7 – Delete Data


Delete Data From a MySQL Table Using MySQLi and PDO

The DELETE statement is used to delete records from a table:

DELETE FROM table_name


WHERE some_column = some_value

Notice the WHERE clause in the DELETE syntax: The WHERE clause specifies which record or
records that should be deleted. If you omit the WHERE clause, all records will be deleted!

19SLSU CCSIT
MAIN CAMPUS
Now let’s create a new file Delete.php. It should look like this.

<?php
include_once 'Connection.php';
if(isset($_POST['id']))
{
$id = $_POST['id'];
$stmt = "DELETE FROM Register WHERE id=$id";
$conn->exec($stmt);
header("Location: List.php");
}
?>

Now you should be able to delete the data in the database.

Summary
We successfully entered some data into our database in this lesson. We also successfully retrieve,
update, and delete this information. We now know how to use PHP and MySQL to conduct CRUD
operations. Most full stack applications require the ability to create, read, update, and delete things
in a web application.

Exercise 3
 Make a 'Book' table with a 'BookTitle' column. Then, in that table, add 5 book titles.
 Create a PHP program to display all of the information in the Book table.
 It should be possible to update the Book Title and delete it.

Midterm Project

Create a PHP program that uses a MySQL database to perform CRUD operations (create,
read/retrieve, update, and delete). Inputs should be validated as well.

References
PHP - Form Introduction. (n.d.). Www.tutorialspoint.com.
https://www.tutorialspoint.com/php/php_form_introduction.htm
PHP - Validation Example. (n.d.). Www.tutorialspoint.com. Retrieved January 26, 2022, from
https://www.tutorialspoint.com/php/php_validation_example.htm
PHP - Complete Form. (n.d.). Www.tutorialspoint.com.
https://www.tutorialspoint.com/php/php_complete_form.htm
XAMPP CONTROL PANEL - javatpoint. (n.d.). Www.javatpoint.com. From
https://www.javatpoint.com/xampp-control-panel

20SLSU CCSIT
MAIN CAMPUS
PHP Insert Data Into MySQL. (2019). W3schools.com.
https://www.w3schools.com/php/php_mysql_insert.asp
‌PHP Select Data From MySQL. (2019). W3schools.com.
https://www.w3schools.com/php/php_mysql_select.asp
‌PHP Delete Data From MySQL. (2014). W3schools.com.
https://www.w3schools.com/php/php_mysql_delete.asp
‌PHP Update Data in MySQL. (2014). W3schools.com.
https://www.w3schools.com/php/php_mysql_update.asp

21SLSU CCSIT
MAIN CAMPUS

You might also like