How to Manage Mysql Database Users Using PHP

How to Manage Mysql Database Users Using PHP

In this article, we will explain How to Manage Mysql Database Users Using PHP. In MySQL, you can create user accounts with different privileges. Root User By default, MySQL has a superuser we called root this user has all the privileges. You can log in as root to execute more than one MySQL admin work, also including […]
Read Full Article
How to Insert Data into Mysql Database using 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"> <div class="name"> <div class="name1"><h1>Student Name:</h1></div> <div class="name2"><input type="text" name="name" value="" /></div> </div> <div class="name"> <div class="name1"><h1>Father […]
Read Full Article
How to Fetch Data From Mysql Database using 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 class="tab1"><h1>Delete</h1></div> <?php $query1 = "select * from table"; $query2 = mysql_query($query1); while($row = mysql_fetch_array($query2)) { […]
Read Full Article
How to Delete Data From Mysql Database

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 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 class="tab1"><h1>Delete</h1></div> <?php […]
Read Full Article
How to Update Data into Database using PHP

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> </div> <div class="name"> <div class="name1"><h1>Father Name:</h1></div> <div class="name2"><input type="text" name="father_name" value="<?php echo $row['father_name']; ?>" /></div> […]
Read Full Article
How to Connect Database in PHP

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 is Mysql. Follow the bellow Code to creating a connection with the Mysql database. Method […]
Read Full Article
How to File Upload in Database using PHP

How to File Upload in Database using PHP

In this article, How to File Upload in Database using PHP. Follow below Steps: HTML Code: file.php <html> <head> <title>File Upload</title> <form method="post" enctype="multipart/form-data" action="upload.php"> <input class="tbl2" type="file" name="f"><span class="txt1">(Type : .jp/* /* eg, .jpg, .gif, .png)</span> <input class="butt2 bt" type="submit" value="save" name="save"> </form> </body> </html> PHP Code: upload.php <?php include('db.php'); if(!empty($_REQUEST['save'])) { $st2=1; $filename=$_FILES['f']['name']; […]
Read Full Article
How to Make Active or Inactive in PHP With Mysql Database

How to Make Active or Inactive in PHP With Mysql Database

We will Explain How to Make Active or Inactive in PHP With Database. <?php mysql_connect('localhost','root',''); mysql_select_db('database'); if(!empty($_GET['status_id'])&&isset($_GET['status_id'])) { $status_id = $_GET['status_id']; $status = $_GET['status']; $query = "update menus set status = '$status' where id = '$status_id'"; mysql_query($query); header("location:menus.php"); } // Active / De-Active Record ?> <html> <head> <title>Active/Deactive</title> </head> <body> <form method="POST"> <table border="1"> <?php […]
Read Full Article
How to Import Data in PHP using Mysql Database

How to Import Data in PHP using Mysql Database

This article, you will learn How to Import Data in PHP using Mysql Database. index.php <html> Mhead> <title>Import Data in PHP</title> </head> <body> <form action="import.php" method="post" name="upload_excel" enctype="multipart/form-data"> <fieldset> <legend>Import CSV/Excel file</legend> <div class="control-group"> <div class="control-label"> <label>CSV/Excel File:</label> </div> <div class="controls"> <input type="file" name="file" id="file" class="input-large"> </div> </div> <div class="control-group"> <div class="controls"> <button type="submit" id="submit" […]
Read Full Article