abc

Share This blog with your friends, so that we can improve more & more . our aim is to easy & simple way of learning.

6/10/2018

create mysql data using php

hi toady we are going to show how to create data using php
<?php
$servername = "localhost";
$username = "root";
$password = "hello";

// Create connection 

$conn = new mysqli($servername, $username, $password);
// Check connection

if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// Create database

$sql = "CREATE DATABASE myDB";
if ($conn->query($sql) === TRUE) {
    echo "Database created successfully";
} else {
    echo "Error creating database: " . $conn->error;
}

$conn->close();
?>
in this session we learn how to create database using php in mysql it may localhost or serverhost
simply pass connection , call database, display message
 

An Introduction to the Laravel Framework: What It Is and Why You Should Use It

  If you're a PHP developer looking for a modern, efficient, and powerful framework to build web applications, look no further than Lara...