I have spent some time looking for answers on the net and to no avail - read some of the posts, but have not seen something that is the same.
The following line is causing me an issue with the following error:
Notice: Undefined index: username in C:\xampp\htdocs\newlogin\authorise.php on line 19
The line it is associated with is the following:
$stmt->bindValue(':username',strtolower($_POST['username']));
I have included all of the code just in case. I have the username column setup in the database (MySQL)
Any advice would be great, am fairly new to this, so my apologies if there is a simple response
<title>authorise</title>
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
try
{
$dbh = new PDO("mysql:host=localhost;dbname=login_site","root","black$23");
}
catch (PDOException $e){
echo $e->getMessage();
}
$query = "select * from 'users' where LOWER ('username')=:username";
$stmt=$dbh->prepare($query);
$stmt->bindValue(':username',strtolower($_POST['username']));<--- issue is on this line
$stmt->execute();
if ($stmt->rowCount()==1){
echo'user found';
}