Linksys Classes PHP Introduction Insert data Display and Delete Data in mysql using PHP

Published: 21 June 2017
on channel: Deepak Prajapati
297
8

This Video will help the students to enable their php knowledge to insert data in Mysql database using PHP Page in simple Language.
Using this Video students can learn how to insert data in mysql table using php code as well as Display data and remove data from Mysql table

Here is the Sample PHP Code :
mysql_connect('localhost','root','');
mysql_select_db('test');
if(isset($_POST['btnSave'])){
$name=$_POST['txtName'];
$email=$_POST['txtEmail'];
$mobile=$_POST['txtMobile'];
$query="insert into info values(0,'$name','$email','$mobile')";
if(mysql_query($query))
echo "Inserted Successfully";
else
echo "Error in Insert";
}
if(isset($_GET['delete']))
{
$id=$_GET['delete'];
// delete from info where id=id
$query="delete from info where id=$id";
mysql_query($query);
header('location:index.php');
}


Watch video Linksys Classes PHP Introduction Insert data Display and Delete Data in mysql using PHP online without registration, duration hours minute second in high quality. This video was added by user Deepak Prajapati 21 June 2017, don't forget to share it with your friends and acquaintances, it has been viewed on our site 297 once and liked it 8 people.