Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

create database in php

 /*MYSQL database can be created easily using this simple script.
The CREATE DATABASE statement creates the database.*/

<?php
   $con=mysqli_connect("example.com","username","password");
   $sql="CREATE DATABASE my_db";
   if (mysqli_query($con,$sql)) {
      echo "Database my_db created successfully";
   }
?>
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #create #database #php
ADD COMMENT
Topic
Name
2+7 =