write database user name in databse connection query
$conn = mysqli_connect("localhost","root","","logintest");
<?php
include 'dbh.php';
$first = $_POST['first'];
$last = $_POST['last'];
$uid = $_POST['uid'];
$pwd = $_POST['pwd'];
if(isset($_POST['submit']))
{
if(mysqli_query($conn,"insert into table_name values('$first','$last','$uid','$pwd')"))
{
echo"data insert";
}
}
?>