The most viewed posts

Contact Me

About Me

Myanmar font and keyboard for Windows

Registry Reviver

IT Support & Endpoint Management

Digital Platforms & Web Solutions

How to clean up Windows Computer

Driver Booster

CCleaner

About Desktop Icons in Windows Computer

The most viewed items

Dell Inspiron 5559

SONY Playstation Portable

HP ProBook 430

Laptop RAM

External Hard Disk

Laptop

Desktop Hard Disk

Please login to start chat

ZilaStar ICT Jun 24 2019, 09:30:40
Category : PHP Tutorials

Inserting data into table (eg.1)

<?php
$server = 'localhost';
$username = 'root';
$password = ' ';
$db = 'TNW';
$conn = mysqli_connect($server, $username, $password, $db);
if($conn){
    $query = "INSERT INTO `username` VALUES(1, 'Thet', 'Naing', 'thet', 'password1'),
                                                                     (2, 'Michael', 'Win', 'win', 'password2'),
                                                                     (3, 'Mya', 'Mya', 'myamya', 'password3')";
                                           
    $query_run = mysqli_query($conn, $query);
    if($query_run){
        echo 'Successfully inserted data into table.';
    }else{
        echo 'Inserting error or Data already exits.';
    }
}else{
    echo 'Connecting to a database Error.';
}
?>

Comments:

No comment.

To Contact
🙏 About Me
📜Terms and Conditions