Insert Data in MySql Database

Insert Data in MySql Database !!

As you read, How to Create Data. Now there is insertion Syntax after creating DATABASE. ‘INSERT’ statement is used to insert data into table.

For Example:

<?php

$sql=“INSERT INTO student(name, emailid, city) VALUES(‘Vihaan’,’vihaan@codingtag.com’,’Delhi’)”;

// student is table name

if ($sql)
{
echo “Record Created Successfully”;
}
else
{
echo “Insertion Failed”;
}

?>



Coding Tag

Coding Tag always happy to serve you in Information Technology (IT). Learn HTML, CSS, Javascript, PHP, Android, Digital Marketing, Latest IT News and many more.

Leave a Reply

avatar
  Subscribe  
Notify of