Im having problem make my php code to make changes in MySQL Database. This is my code: ** The star is username and password
<?php
$con=mysqli_connect("192.168.1.98","*****","*****","test");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
echo "Connected successfully";
//Query
mysqli_query($con,"INSERT INTO users (email, password, name)
VALUES ('Glenn','Quagmire',33)");
?>
I am able to communicate with the MySQL Server, With the check connection conditions, When I input wrong passwd it gives me error, and provide success when I connected.
I am also able to modify my database with MySQL Workbench, but I can't do it with PHP Code. Is there a way to Put values in the database.\
- Is my PHP Code Wrong?
- Is my Netbeans unable to connect to the MySQL?
- Is there a problem between PHP and MySQL in the login and condition checking?
Thanks anyway.