SlideShare a Scribd company logo
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "DB";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$first_name=$_POST['firstname'];
$last_name=$_POST['lastname'];
$sql = "INSERT INTO DB (firstname, lastname, email)
VALUES ('John', 'Doe', 'john@example.com')";
Update Query:
<?php
if ($_POST['update'])
{
$id=$_POST['id'];
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$email=$_POST['email'];
$address=$_POST['address'];
$city=$_POST[‘id’];
$phone=$_POST['phone'];
$password=$_POST['password'];
$sql = "UPDATE FF SET lastname='Doe' WHERE id=2";
Del Query:
<a href="open_delete.php?del=<?php echo $row['id']; ?>">Delete</a>
<?php } ?>
$sql = "DELETE FROMDB WHERE id=1";
View Query:
<table class="table table-striped " width="60%" align="center">
<thead>
<tr>
<th align="center">ID</th>
<th align="center">First Name</th>
<th align="center">Last Name</th>
<th align="center">Email</th>
<th align="center">Address</th>
<th align="center">City</th>
<th align="center">Postal Code</th>
<th align="center">Phone Number</th>
<th align="center">Mobiel</th>
<th align="center">Password</th>
<th align="center">Action</th>
<?php
include("../connection.php");
$select="SELECT * FROM `openliveaccount`";
$query=mysqli_query($conn,$select);
while($row=mysqli_fetch_array($query))
{
$id=$row['id'];
?>
</tr>
</thead>
<tbody>
<tr>
<td ><?php echo $row['id'];?></td>
<td ><?php echo $row['first_name'];?></td>
<td ><?php echo $row['last_name'];?></td>
<td ><?php echo $row['email'];?></td>
<td ><?php echo $row['address'];?></td>
<td ><?php echo $row['city'];?></td>
<td ><?php echo $row['postal_code'];?></td>
<td ><?php echo $row['phone_number'];?></td>
<td ><?php echo $row['mobile'];?></td>
<td ><?php echo $row['password'];?></td>

More Related Content

Similar to Php.docx (20)

The HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup languageThe HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup language
Lovely Professional University
 
Unit 4- Working with SQL.pptx
Unit 4- Working with SQL.pptxUnit 4- Working with SQL.pptx
Unit 4- Working with SQL.pptx
mythili213835
 
UNIT V (5).pptx
UNIT V (5).pptxUNIT V (5).pptx
UNIT V (5).pptx
DrDhivyaaCRAssistant
 
Database Connectivity MYSQL by Dr.C.R.Dhivyaa Kongu Engineering College
Database Connectivity MYSQL by Dr.C.R.Dhivyaa Kongu Engineering CollegeDatabase Connectivity MYSQL by Dr.C.R.Dhivyaa Kongu Engineering College
Database Connectivity MYSQL by Dr.C.R.Dhivyaa Kongu Engineering College
Dhivyaa C.R
 
Introtodatabase 1
Introtodatabase 1Introtodatabase 1
Introtodatabase 1
Digital Insights - Digital Marketing Agency
 
This slide show will brief about database handling
This slide show will brief about database handlingThis slide show will brief about database handling
This slide show will brief about database handling
averynight005
 
Php update and delet operation
Php update and delet operationPhp update and delet operation
Php update and delet operation
syeda zoya mehdi
 
PHP Database Programming Basics -- Northeast PHP
PHP Database Programming Basics -- Northeast PHPPHP Database Programming Basics -- Northeast PHP
PHP Database Programming Basics -- Northeast PHP
Dave Stokes
 
Delete statement in PHP
Delete statement in PHPDelete statement in PHP
Delete statement in PHP
Vineet Kumar Saini
 
Web-based application development part 31MINIMIZE .docx
Web-based application development part 31MINIMIZE .docxWeb-based application development part 31MINIMIZE .docx
Web-based application development part 31MINIMIZE .docx
celenarouzie
 
Php modul-3
Php modul-3Php modul-3
Php modul-3
Kristophorus Hadiono
 
SQL Prepared Statements Tutorial
SQL Prepared Statements TutorialSQL Prepared Statements Tutorial
SQL Prepared Statements Tutorial
ProdigyView
 
FYBSC IT Web Programming Unit V Advanced PHP and MySQL
FYBSC IT Web Programming Unit V  Advanced PHP and MySQLFYBSC IT Web Programming Unit V  Advanced PHP and MySQL
FYBSC IT Web Programming Unit V Advanced PHP and MySQL
Arti Parab Academics
 
Chapter 09 php my sql
Chapter 09   php my sqlChapter 09   php my sql
Chapter 09 php my sql
Dhani Ahmad
 
Connecting_to_Database(MySQL)_in_PHP.pptx
Connecting_to_Database(MySQL)_in_PHP.pptxConnecting_to_Database(MySQL)_in_PHP.pptx
Connecting_to_Database(MySQL)_in_PHP.pptx
TempMail233488
 
SQL -PHP Tutorial
SQL -PHP TutorialSQL -PHP Tutorial
SQL -PHP Tutorial
Information Technology
 
4.3 MySQL + PHP
4.3 MySQL + PHP4.3 MySQL + PHP
4.3 MySQL + PHP
Jalpesh Vasa
 
Update statement in PHP
Update statement in PHPUpdate statement in PHP
Update statement in PHP
Vineet Kumar Saini
 
Hello I need help getting my delete and additem button to work- The de.pdf
Hello I need help getting my delete and additem button to work- The de.pdfHello I need help getting my delete and additem button to work- The de.pdf
Hello I need help getting my delete and additem button to work- The de.pdf
Ian0J2Bondo
 
DIWE - Working with MySQL Databases
DIWE - Working with MySQL DatabasesDIWE - Working with MySQL Databases
DIWE - Working with MySQL Databases
Rasan Samarasinghe
 
The HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup languageThe HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup language
Lovely Professional University
 
Unit 4- Working with SQL.pptx
Unit 4- Working with SQL.pptxUnit 4- Working with SQL.pptx
Unit 4- Working with SQL.pptx
mythili213835
 
Database Connectivity MYSQL by Dr.C.R.Dhivyaa Kongu Engineering College
Database Connectivity MYSQL by Dr.C.R.Dhivyaa Kongu Engineering CollegeDatabase Connectivity MYSQL by Dr.C.R.Dhivyaa Kongu Engineering College
Database Connectivity MYSQL by Dr.C.R.Dhivyaa Kongu Engineering College
Dhivyaa C.R
 
This slide show will brief about database handling
This slide show will brief about database handlingThis slide show will brief about database handling
This slide show will brief about database handling
averynight005
 
Php update and delet operation
Php update and delet operationPhp update and delet operation
Php update and delet operation
syeda zoya mehdi
 
PHP Database Programming Basics -- Northeast PHP
PHP Database Programming Basics -- Northeast PHPPHP Database Programming Basics -- Northeast PHP
PHP Database Programming Basics -- Northeast PHP
Dave Stokes
 
Web-based application development part 31MINIMIZE .docx
Web-based application development part 31MINIMIZE .docxWeb-based application development part 31MINIMIZE .docx
Web-based application development part 31MINIMIZE .docx
celenarouzie
 
SQL Prepared Statements Tutorial
SQL Prepared Statements TutorialSQL Prepared Statements Tutorial
SQL Prepared Statements Tutorial
ProdigyView
 
FYBSC IT Web Programming Unit V Advanced PHP and MySQL
FYBSC IT Web Programming Unit V  Advanced PHP and MySQLFYBSC IT Web Programming Unit V  Advanced PHP and MySQL
FYBSC IT Web Programming Unit V Advanced PHP and MySQL
Arti Parab Academics
 
Chapter 09 php my sql
Chapter 09   php my sqlChapter 09   php my sql
Chapter 09 php my sql
Dhani Ahmad
 
Connecting_to_Database(MySQL)_in_PHP.pptx
Connecting_to_Database(MySQL)_in_PHP.pptxConnecting_to_Database(MySQL)_in_PHP.pptx
Connecting_to_Database(MySQL)_in_PHP.pptx
TempMail233488
 
Hello I need help getting my delete and additem button to work- The de.pdf
Hello I need help getting my delete and additem button to work- The de.pdfHello I need help getting my delete and additem button to work- The de.pdf
Hello I need help getting my delete and additem button to work- The de.pdf
Ian0J2Bondo
 
DIWE - Working with MySQL Databases
DIWE - Working with MySQL DatabasesDIWE - Working with MySQL Databases
DIWE - Working with MySQL Databases
Rasan Samarasinghe
 

Recently uploaded (20)

Security Monitor Pro 6.22 Crack Free Download
Security Monitor Pro 6.22 Crack Free DownloadSecurity Monitor Pro 6.22 Crack Free Download
Security Monitor Pro 6.22 Crack Free Download
Software
 
Adobe Photoshop CC Crack Download Latest Version 2025
Adobe Photoshop CC Crack Download Latest  Version 2025Adobe Photoshop CC Crack Download Latest  Version 2025
Adobe Photoshop CC Crack Download Latest Version 2025
meashraf khan
 
Scrivener 3.1.0.0 Crack + Keygen Full Version Download 2025
Scrivener 3.1.0.0 Crack + Keygen Full Version Download 2025Scrivener 3.1.0.0 Crack + Keygen Full Version Download 2025
Scrivener 3.1.0.0 Crack + Keygen Full Version Download 2025
Designer
 
Captivating 3D Interior Render of Elegant Residential Project in Jeddah City,...
Captivating 3D Interior Render of Elegant Residential Project in Jeddah City,...Captivating 3D Interior Render of Elegant Residential Project in Jeddah City,...
Captivating 3D Interior Render of Elegant Residential Project in Jeddah City,...
Yantram Animation Studio Corporation
 
FonePaw Data Recovery 2.6.0 Crack Full Version [Latest]
FonePaw Data Recovery 2.6.0 Crack Full Version [Latest]FonePaw Data Recovery 2.6.0 Crack Full Version [Latest]
FonePaw Data Recovery 2.6.0 Crack Full Version [Latest]
Google
 
OntologyDuVerneayBigDesign2025_May28.pptx
OntologyDuVerneayBigDesign2025_May28.pptxOntologyDuVerneayBigDesign2025_May28.pptx
OntologyDuVerneayBigDesign2025_May28.pptx
Jessica DuVerneay
 
Verayouth Chotivanich Portfolio
Verayouth Chotivanich PortfolioVerayouth Chotivanich Portfolio
Verayouth Chotivanich Portfolio
Verayouth Chotivanich
 
FL Studio Producer Edition Crack + Full Version [Latest]
FL Studio Producer Edition Crack + Full Version [Latest]FL Studio Producer Edition Crack + Full Version [Latest]
FL Studio Producer Edition Crack + Full Version [Latest]
Mudasir
 
NetSarang Xmanager Power Suite 8.0.0010 Crack New Version Latest 2025
NetSarang Xmanager Power Suite 8.0.0010 Crack New Version Latest 2025NetSarang Xmanager Power Suite 8.0.0010 Crack New Version Latest 2025
NetSarang Xmanager Power Suite 8.0.0010 Crack New Version Latest 2025
abidkhan77g77
 
Design and research synthesis: how to make sense of all what you've learned?
Design and research synthesis: how to make sense of all what you've learned?Design and research synthesis: how to make sense of all what you've learned?
Design and research synthesis: how to make sense of all what you've learned?
Master Service Design
 
Empowering Women through Interactive Social Design.pptx
Empowering Women through Interactive Social Design.pptxEmpowering Women through Interactive Social Design.pptx
Empowering Women through Interactive Social Design.pptx
Prof. Hany M. El-Said
 
TFT Unlock Tool For PC & Windows Fully Unlocked {Lifetime}
TFT Unlock Tool For PC & Windows Fully Unlocked {Lifetime}TFT Unlock Tool For PC & Windows Fully Unlocked {Lifetime}
TFT Unlock Tool For PC & Windows Fully Unlocked {Lifetime}
Mudasir
 
Apowersoft Video Editor 1.6.8.13 ApowerEdit Crack Download
Apowersoft Video Editor 1.6.8.13 ApowerEdit Crack DownloadApowersoft Video Editor 1.6.8.13 ApowerEdit Crack Download
Apowersoft Video Editor 1.6.8.13 ApowerEdit Crack Download
Designer
 
Designing for Critical and Severe Medical Cases.pptx
Designing for Critical and Severe Medical Cases.pptxDesigning for Critical and Severe Medical Cases.pptx
Designing for Critical and Severe Medical Cases.pptx
Prof. Hany M. El-Said
 
Bulk Image Downloader 6.02.0 Full Crack Download 2025
Bulk Image Downloader 6.02.0 Full Crack Download 2025Bulk Image Downloader 6.02.0 Full Crack Download 2025
Bulk Image Downloader 6.02.0 Full Crack Download 2025
Designer
 
Total Uninstall Pro 7 Crack Free Download [Latest]
Total Uninstall Pro 7 Crack Free Download [Latest]Total Uninstall Pro 7 Crack Free Download [Latest]
Total Uninstall Pro 7 Crack Free Download [Latest]
Designer
 
From Chaos to Clarity - A Framework to Maximize Design Impact.pdf
From Chaos to Clarity - A Framework to Maximize Design Impact.pdfFrom Chaos to Clarity - A Framework to Maximize Design Impact.pdf
From Chaos to Clarity - A Framework to Maximize Design Impact.pdf
matthewjdoty
 
Best Website Designing Company In Delhi NCR
Best Website Designing Company In Delhi NCRBest Website Designing Company In Delhi NCR
Best Website Designing Company In Delhi NCR
Etoile Info Solutions
 
CleanMyPC Crack 1.12.0.2113 + Activation Code 2025
CleanMyPC Crack 1.12.0.2113 + Activation Code 2025CleanMyPC Crack 1.12.0.2113 + Activation Code 2025
CleanMyPC Crack 1.12.0.2113 + Activation Code 2025
Yahoo
 
Seven Park Residences, Hallandale Beach.
Seven Park Residences, Hallandale Beach.Seven Park Residences, Hallandale Beach.
Seven Park Residences, Hallandale Beach.
TAMZ
 
Security Monitor Pro 6.22 Crack Free Download
Security Monitor Pro 6.22 Crack Free DownloadSecurity Monitor Pro 6.22 Crack Free Download
Security Monitor Pro 6.22 Crack Free Download
Software
 
Adobe Photoshop CC Crack Download Latest Version 2025
Adobe Photoshop CC Crack Download Latest  Version 2025Adobe Photoshop CC Crack Download Latest  Version 2025
Adobe Photoshop CC Crack Download Latest Version 2025
meashraf khan
 
Scrivener 3.1.0.0 Crack + Keygen Full Version Download 2025
Scrivener 3.1.0.0 Crack + Keygen Full Version Download 2025Scrivener 3.1.0.0 Crack + Keygen Full Version Download 2025
Scrivener 3.1.0.0 Crack + Keygen Full Version Download 2025
Designer
 
Captivating 3D Interior Render of Elegant Residential Project in Jeddah City,...
Captivating 3D Interior Render of Elegant Residential Project in Jeddah City,...Captivating 3D Interior Render of Elegant Residential Project in Jeddah City,...
Captivating 3D Interior Render of Elegant Residential Project in Jeddah City,...
Yantram Animation Studio Corporation
 
FonePaw Data Recovery 2.6.0 Crack Full Version [Latest]
FonePaw Data Recovery 2.6.0 Crack Full Version [Latest]FonePaw Data Recovery 2.6.0 Crack Full Version [Latest]
FonePaw Data Recovery 2.6.0 Crack Full Version [Latest]
Google
 
OntologyDuVerneayBigDesign2025_May28.pptx
OntologyDuVerneayBigDesign2025_May28.pptxOntologyDuVerneayBigDesign2025_May28.pptx
OntologyDuVerneayBigDesign2025_May28.pptx
Jessica DuVerneay
 
FL Studio Producer Edition Crack + Full Version [Latest]
FL Studio Producer Edition Crack + Full Version [Latest]FL Studio Producer Edition Crack + Full Version [Latest]
FL Studio Producer Edition Crack + Full Version [Latest]
Mudasir
 
NetSarang Xmanager Power Suite 8.0.0010 Crack New Version Latest 2025
NetSarang Xmanager Power Suite 8.0.0010 Crack New Version Latest 2025NetSarang Xmanager Power Suite 8.0.0010 Crack New Version Latest 2025
NetSarang Xmanager Power Suite 8.0.0010 Crack New Version Latest 2025
abidkhan77g77
 
Design and research synthesis: how to make sense of all what you've learned?
Design and research synthesis: how to make sense of all what you've learned?Design and research synthesis: how to make sense of all what you've learned?
Design and research synthesis: how to make sense of all what you've learned?
Master Service Design
 
Empowering Women through Interactive Social Design.pptx
Empowering Women through Interactive Social Design.pptxEmpowering Women through Interactive Social Design.pptx
Empowering Women through Interactive Social Design.pptx
Prof. Hany M. El-Said
 
TFT Unlock Tool For PC & Windows Fully Unlocked {Lifetime}
TFT Unlock Tool For PC & Windows Fully Unlocked {Lifetime}TFT Unlock Tool For PC & Windows Fully Unlocked {Lifetime}
TFT Unlock Tool For PC & Windows Fully Unlocked {Lifetime}
Mudasir
 
Apowersoft Video Editor 1.6.8.13 ApowerEdit Crack Download
Apowersoft Video Editor 1.6.8.13 ApowerEdit Crack DownloadApowersoft Video Editor 1.6.8.13 ApowerEdit Crack Download
Apowersoft Video Editor 1.6.8.13 ApowerEdit Crack Download
Designer
 
Designing for Critical and Severe Medical Cases.pptx
Designing for Critical and Severe Medical Cases.pptxDesigning for Critical and Severe Medical Cases.pptx
Designing for Critical and Severe Medical Cases.pptx
Prof. Hany M. El-Said
 
Bulk Image Downloader 6.02.0 Full Crack Download 2025
Bulk Image Downloader 6.02.0 Full Crack Download 2025Bulk Image Downloader 6.02.0 Full Crack Download 2025
Bulk Image Downloader 6.02.0 Full Crack Download 2025
Designer
 
Total Uninstall Pro 7 Crack Free Download [Latest]
Total Uninstall Pro 7 Crack Free Download [Latest]Total Uninstall Pro 7 Crack Free Download [Latest]
Total Uninstall Pro 7 Crack Free Download [Latest]
Designer
 
From Chaos to Clarity - A Framework to Maximize Design Impact.pdf
From Chaos to Clarity - A Framework to Maximize Design Impact.pdfFrom Chaos to Clarity - A Framework to Maximize Design Impact.pdf
From Chaos to Clarity - A Framework to Maximize Design Impact.pdf
matthewjdoty
 
Best Website Designing Company In Delhi NCR
Best Website Designing Company In Delhi NCRBest Website Designing Company In Delhi NCR
Best Website Designing Company In Delhi NCR
Etoile Info Solutions
 
CleanMyPC Crack 1.12.0.2113 + Activation Code 2025
CleanMyPC Crack 1.12.0.2113 + Activation Code 2025CleanMyPC Crack 1.12.0.2113 + Activation Code 2025
CleanMyPC Crack 1.12.0.2113 + Activation Code 2025
Yahoo
 
Seven Park Residences, Hallandale Beach.
Seven Park Residences, Hallandale Beach.Seven Park Residences, Hallandale Beach.
Seven Park Residences, Hallandale Beach.
TAMZ
 

Php.docx

  • 1. <?php $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "DB"; $conn = new mysqli($servername, $username, $password, $dbname); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $first_name=$_POST['firstname']; $last_name=$_POST['lastname']; $sql = "INSERT INTO DB (firstname, lastname, email) VALUES ('John', 'Doe', '[email protected]')"; Update Query: <?php if ($_POST['update']) { $id=$_POST['id']; $firstname=$_POST['firstname']; $lastname=$_POST['lastname']; $email=$_POST['email']; $address=$_POST['address']; $city=$_POST[‘id’]; $phone=$_POST['phone']; $password=$_POST['password']; $sql = "UPDATE FF SET lastname='Doe' WHERE id=2";
  • 2. Del Query: <a href="open_delete.php?del=<?php echo $row['id']; ?>">Delete</a> <?php } ?> $sql = "DELETE FROMDB WHERE id=1"; View Query: <table class="table table-striped " width="60%" align="center"> <thead> <tr> <th align="center">ID</th> <th align="center">First Name</th> <th align="center">Last Name</th> <th align="center">Email</th> <th align="center">Address</th> <th align="center">City</th> <th align="center">Postal Code</th> <th align="center">Phone Number</th> <th align="center">Mobiel</th> <th align="center">Password</th> <th align="center">Action</th> <?php include("../connection.php"); $select="SELECT * FROM `openliveaccount`"; $query=mysqli_query($conn,$select); while($row=mysqli_fetch_array($query)) { $id=$row['id']; ?> </tr> </thead> <tbody> <tr> <td ><?php echo $row['id'];?></td> <td ><?php echo $row['first_name'];?></td> <td ><?php echo $row['last_name'];?></td> <td ><?php echo $row['email'];?></td> <td ><?php echo $row['address'];?></td> <td ><?php echo $row['city'];?></td> <td ><?php echo $row['postal_code'];?></td>
  • 3. <td ><?php echo $row['phone_number'];?></td> <td ><?php echo $row['mobile'];?></td> <td ><?php echo $row['password'];?></td>