I'm trying to look for the text exist in the row inside the table called website.
Where uid is INT and domain is String.
If the Row is found and both uid and domain matches. It should output success.
If the Row Value doesn't exist, it should output nothing
Both UID and domain are giving by the user in input form.
With the below code, It's not working. I'm not sure what I'm doing wrong.
$stmt = $conn->prepare('SELECT * FROM website WHERE uid=:uid AND domain=:domain');
$stmt->bindParam(1, $_GET['uid'], PDO::PARAM_INT);
$stmt->bindParam(2, $_GET['domain'], PDO::PARAM_STR);
$stmt->execute();
$row = $stmt->fetch(PDO::FETCH_ASSOC);
if($row)
{
echo "found";
}
else {
echo "nothing";
}