I was trying to insert some data in the 000Webhost database but the data seems not to be inserting whereas all other queries like UPDATE or SELECT is working. Can anyone please provide me with some ways to solve this. I have used PHP to insert the data. Here is my code:
$host = 'localhost';
$user = 'id17881459_root';
$dbpass = '*********';
$db = 'id17881459_sandesh';
$conn = mysqli_connect($host,$user,$dbpass,$db);
$insertuser = "INSERT INTO users(first_name, last_name, dob, email, pass, phno,rec_email) VALUES('$fname','$lname','$dob','$email','$hashedpass','$phone','$recemail')";
$insertuserres = mysqli_query($conn,$insertuser);
It shows no output but most importantly, this code is working fine on my localhost server. Thanks in advance
source https://stackoverflow.com/questions/70237220/cannot-insert-any-records-in-a-000webhost-database-table
No comments:
Post a Comment