Good afternoon, I'm trying to leave each page with a different title picking based on the id. I have to tell you that I'm a good beginner in the field and probably should not be anything special, my code looks like this:
<?php
include 'conta/config.php';
$codigo = $_GET["id"];
//echo $id;
//exit;
$titulo = "SELECT titulo FROM tbl_criticas WHERE id = $codigo;";
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>
<?php echo $titulo; ?>
</title>
In the title it returns " SELECT title FROM tbl_criticas WHERE id = 34; ". But I would like it to return the product title 34, does anyone give me a strength here?