I am having trouble connecting my php page to my database in PHPMyAdmin.. it is a sign up page, I am trying to insert the data into the table named admin but it is not working. And the output is as shown in the screenshot
<?php
$q= mysqli_connect("localhost","root","","saramadani");
if (mysqli_connect_errno())
{
echo("Error In connection");
}
else
{
echo("<center><h1>Database Connected</h1>");
}
$ufname=($_POST['ufname']);
$ulname=($_POST['ulname']);
$username=($_POST['username']);
$uemail=($_POST['uemail']);
$umobile=($_POST['umobile']);
$password=($_POST['password']);
$sql="INSERT INTO admin(ufname,ulname,username,uemail,umobile,password)VALUES('$ufname','$ulname','$username','$uemail','$umobile','$password')";
if(mysqli_query($q,$sql))
{echo "<center><h1>Record added successfully</h1>";}
else
{echo "error in insertion";}
mysqli_close($q);
**And here is the form part code where the post function:**
<form action="signup1.php" method="post">
<input type="text" name="ufname" required>
<input type="text" name="ulname" required>
<input type="text" name="username" required>
<input type="email" name="uemail" required>
<input type="phone" name="umobile" required>
<input type="password" name="password" required>
<button type="submit">Sign up</button>
</form>