Skip to main content

Data isn't inserting in Database table [duplicate]

These are the queries to create a registeration form

<?php
        if(isset($_POST['submit'])){
            $name = $_POST['name'];
            $email = $_POST['email'];
            $mobno = $_POST['mobno'];
            $password = $_POST['password'];
        $user_id=uniqid();
            $query = "insert into users (user_id, name, email, mobno, password) values('$user_id', '$name', '$email', '$mobno', '$password')";
        $run = mysqli_query($conn, $query);
        
        if($run === true)
        {
            echo "Your account is created successfully";
        }
        else{
            echo "Your account is not created";
        }
        }
        ?>

I am unable to create an account through this line of code



source https://stackoverflow.com/questions/68595934/data-isnt-inserting-in-database-table

Comments