S06 Insert Into

S06 Insert Into
<html>
<head>
</head>
<body>
<h1>My First File</h1>

<?php
$servername = "localhost";
$username = "saurabh";
$password = "123456";
$dbname = "saurabh";

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

// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 
echo "Connected successfully<br>";

// select database
$username=$_POST["username"];
$password=$_POST["password"];
$email=$_POST["email"];
$mobile=$_POST["mobile"];

$sql = "INSERT INTO regform (username, password, email, mobile)
VALUES ('$username', '$password', '$email', '$mobile')"
;
$result = $conn->query($sql);


?>
</body>
</html>

Take Your Free Live Demo Class Now

We Will Call Back You Shortly

Enter Your DETAILS BELOW

We Will Send You the Course Fees Details In Below Number

Enter Your DETAILS BELOW

We Will Call Back You Shortly

Enter Your DETAILS BELOW

We Will Call Back You Shortly

Enter Your DETAILS BELOW

Enter Your DETAILS BELOW TO take

free demo class