Mysql

how to connect database in php

How to Insert Data into Mysql Database using PHP

In this tutorial, we will explain How to insert data into Mysql database using PHP. If you want to save the record in one place then insert the data into the database.

Below Steps:

index.php

<form method="post" action="insert.php" enctype="multipart/form-data">
how to connect database in php

How to Fetch Data From Mysql Database using PHP

How to Fetch Data From Mysql Database using PHP, from inserted data in Mysql database.

HTML Code

<div class="table">
	<div class="tab1"><h1>Name</h1></div>
    <div class="tab1"><h1>Father name</h1></div>
    <div class="tab1"><h1>Mother name</h1></div>
    <div class="tab1"><h1>E-mail</h1></div>
    <div class="tab1"><h1>Address</h1></div>
    <div class="tab1"><h1>DOB</h1></div>
    <div class="tab1"><h1>Category</h1></div>
    <div class="tab1"><h1>Image</h1></div>
    <div class="tab1"><h1>Action</h1></div>
    <div 
delete all data from table mysql

How to Delete Data From Mysql Database

In this tutorial, we will explain how to Delete Data from Mysql database which is already inserted in the database using PHP.

table.php

<?php
include(db.php);
?>
<html>
<head>
<title>Table</title>
</head>
<body>
<div class="table">
	<div class="tab1"><h1>Name</h1></div>
    <div class="tab1"><h1>Father name</h1></div>
    <div class="tab1"><h1>Mother 
how to update data in php using form

How to Update Data into Database using PHP

Today we will guide you How to Update Data into Database using PHP and MySQL.

index.php

<html>
<head>
<title>Update Data</title>
</head>
<body>
<form method="post" action="update.php" enctype="multipart/form-data">
<div class="name">
	<div class="name1"><h1>Student Name:</h1></div>
	<div class="name2"><input type="text" name="name" value="<?php echo $row['name']; ?>" /></div>
config.php file

How to Connect the Database in PHP

We will tell you how to connect the database in PHP. In any PHP file for insert/Delete/update/fetch data from Mysql database. we have to create a connection with the Mysql database. This connection will be the type of the database …