PHP
OOPs
JavaScript
JQuery
Ajax
Codeigniter
Laravel
MySql
Node.js
Tutorials
C
C++
Json
Codeigniter 4
htaccess
wordpress
react.js
Blogs
Fundamental
Python
Search Your Query
×
--- Select Category ---
PHP
OOPs
JavaScript
JQuery
Ajax
Codeigniter
Laravel
MySql
Node.js
Tutorials
Blogs
Fundamental
Python
Most Popular Tutorials
What is oops
Access Modifier
Constructor
Destructor
Polymorphism
Inheritence
Method overriding
Abstract class
Interface
Traits
this keywords
static keyword
Final keyword
class constant
Exception handling
Binding
toString method
Object Iteration
Reflection
Namespaces
CRUD Functions
Oops crud Project
crud example
Tutorials Menus
What is oops
Access Modifier
Constructor
Destructor
Polymorphism
Inheritence
Method overriding
Abstract class
Interface
Traits
this keywords
static keyword
Final keyword
class constant
Exception handling
Binding
toString method
Object Iteration
Reflection
Namespaces
CRUD Functions
Oops crud Project
crud example
Share On Facebook
How to create crud in php?
create Database connection
File Name : config.php
<?php
$servername = "localhost";
$username = "username";
$password = "password";
// Create connection
$conn = mysqli_connect($servername, $username, $password);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
// Check connection
if($conn === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
// mysqli_close($conn);
?>
/* ********************** OR ***************** */
<?php
$host = "localhost";
$username ="root";
$password = "";
$db_name = "gmax";
$con = mysqli_connect($host,$username,$password) or die(mysqli_error());
mysqli_select_db($con,$db_name)or die(mysqli_error($con));
// mysqli_close($conn);
?>
/* ********************** OR ***************** */
<?php
define ( 'DB_HOST', 'localhost' );
define ( 'DB_USER', 'gmax' );
define ( 'DB_PASSWORD', 'gmaxpass' );
define ( 'DB_NAME', 'gmaxdb' );
$conn = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD) or die('Could not connect to database server.');
mysqli_select_db($conn,DB_NAME) or die('Could not select database.');
?>
File Name :
Share On Facebook
Previous
Next
Trending Tutorials
PHP
100+ Tutorials
PHP OOPs
80+ Tutorial
Codeigniter
100+ Tutorial
Laravel
100+ Tutorials
NODE.JS
100+ Tutorials
Javascript
100+ Tutorials
Download Live Projects
Review & Rating
0.0
/ 5
0
Review
5
(
0
)
4
(
0
)
3
(
0
)
2
(
0
)
1
(
0
)
Write Review Here
Review
Submit Review
×
Submit
Ittutorial
Ittutorial
Most Popular Tutorials
Method overriding
Destructor
What is oops
class constant
toString method
Object Iteration
Namespaces
static keyword
Constructor
Abstract class
Polymorphism
Oops crud Project
Access Modifier
Interface
Inheritence
Exception handling
Reflection
this keywords
Binding
crud example
Important Link
Core php Online Advance Tutorails and video Tutorials.
How to manage Session in php Tutorials.
More .......
upcomming codeigniter and angular js tutorials.
Click here to see More ...
Hello Friend Please Follow & Share Ittutorial.
×
Ittutorial
Please Follow and Share ittutorial.
Ittutorial