<?php //Database connection in php $host='localhost'; $username='root'; $password=''; $dbname='myprojectdb'; $conn=mysqli_connect($host,$username,$password,$dbname); //Insert query in php $sql="INSERT INTO `member`(`username`,`password`,`name`,`email`,`phone`,`city`,`address`,`date`) VALUES('".trim($_POST['username'])."','".trim($_POST['password'])."','".trim($_POST['name'])."','".trim($_POST['email'])."','".trim($_POST['phone'])."','".trim($_POST['city'])."','".trim($_POST['address'])."','".date('Y-m-d')."')"; $res=mysqli_query($conn,$sql); ?>