I'm making a program that allows the user to enter the ID of the person in question, and then displays all the data in a table.
So far, I have these two codes:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<link rel="stylesheet" href="/css/main.css">
</head>
<body>
<form action="search_php.php" method="post">
ID: <input type="text" name="name"><br>
<input type="submit">
</form>
</body>
</html>
E
<?php
$db = "database_arduino.db"
$name = ["name"]
$sql = "SELECT * FROM reciclagem_data WHERE personID = $name"
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<link rel="stylesheet" href="/css/main.css">
</head>
<body>
<table></table>
</body>
</html>
From what I know, I'm having problems with the PHP connection to the SQLITE3 database, and in the second code, on the SELECT * FROM reciclagem_data WHERE $name
line. I want the program to register the variable that the user types and then, with that same database, be used to display the user's data.