Hy
I'm new in the world of scripting PHP, HTML and local hosting with Xampp, so i,m trying to learn a bit about it all.
I've created a form in php with and made the connection with the local mysql to save the input data in the table i've creted in myphpadmin:
<?php
$con=mysqli_connect("127.0.0.1","wduizer","q4MnayTwatX4yJQA","basic_web_development");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$sql="INSERT INTO waardes (naam, telnr, email)
VALUES
('$_POST[naam]','$_POST[telnr]','$_POST[email]')";
if (!mysqli_query($con,$sql))
{
die('Error: ' . mysqli_error($con));
}
echo "1 record added";
mysqli_close($con);
?>
And then it won't go as planned.
I'll get the following message:
Warning: mysqli_connect(): (HY000/1045): Access denied for user 'wduizer'@'localhost' (using password: YES) in G:\htdocs\vza-academy\basic_web_development\html_form_action.php on line 2
Failed to connect to MySQL: Access denied for user 'wduizer'@'localhost' (using password: YES)
Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in G:\htdocs\vza-academy\basic_web_development\html_form_action.php on line 13
Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given in G:\htdocs\vza-academy\basic_web_development\html_form_action.php on line 15
Error:
please help....