-1
I am making a program that allows the user to enter the ID of the person in question and later shows in a table all the data of it.
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>
And
<?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 connection of PHP to the SQLITE3 database and, in the second code, on the line SELECT * FROM reciclagem_data WHERE $name
. I want the program to record the variable that the user enters and then, with the same database, it is used to display the user’s data.
HTML, which is yours
form
. Theform
will send the data to your file with the PHP script. It will process and display the content. This– rbz
In view of this you have much simpler doubts than you want to do. You need to know at least how html works and php colleague. No use running over things. Try to see the basics before, if it will not be too difficult something that is simple. I suggest a free course EXTREMELY good: Cursoemvid
– rbz
Even so, man, you’re starting at the end. It’s gonna be complicated. Look for xampp (serivdor php), after that you’ll have to release sqlite driver (php.ini) ... after that, you’ll need to know what you’re doing in html/php, if it won’t be too much trouble. Good luck.
– rbz