Login

Username:

Password: 

Join us Now |  Forgot Password? | Forgot UserName?

PHP

Learn step by step



Insert data in mysql table

insert data into database
syntax
INSERT INTO tableName (field1,field2,...) VALUES ('data1','data2',...)

<?php
//the example of inserting data
//data_insert.php
mysql_connect("localhost","root","admin");//database connection
mysql_select_db("employees");
$order = "INSERT INTO employee
(name, address)
VALUES
('xcvbn',
'ramlal')";
//inserting data order
//declare in the order variable
$result = mysql_query($order);
if($result){
echo("<br>Input data is succeed");
}else{
echo("<br>Input data is fail");
}
?>


Related Videos