Group 1
Group 1
TASK 1
TASK 2
1. CREATE DATABASE arsha_db
2. CREATE TABLE contact_tb
TASK 3
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "arsha_db";
?>
After connection database you need to take post variable from the form. See the below code
<?php
$txtName = $_POST['txtname'];
$txtEmail = $_POST['txtemail'];
$txtPhone = $_POST['txtsubject'];
$txtMessage = $_POST['txtmessage'];
?>
<?php
$sql = "INSERT INTO `contat_tb` (`Id`, `your name`, `your email`, `subject`, `Message`) VALUES ('0',
'$txtname', '$txtemail', '$txtsubject', '$txtmessage');"
?>
<?php
?>
Here is PHP code for inserting data into your database from a form.
<?php
$txtName = $_POST['txtname'];
$txtEmail = $_POST['txtemail'];
$txtPhone = $_POST['txtsubject'];
$txtMessage = $_POST['txtmessage'];
$sql = "INSERT INTO `contat_tb` (`Id`, `your name`, `your email`, `subject`, `message`) VALUES ('0',
'$txtname', '$txtemail', '$txtsubject', '$txtmessage')";
// insert in database
if($rs)
?>
<?php