Well I'm doing a dictionary type page, the page has a search box where the user will enter a word and it will be sent to a page with the result, but that page at the beginning will be blank and the content will change according to the search that the user realizes, suppose that it sends my web page as it would that the dynamic content appears in the searches of google. Excuse my ignorance on the subject but I'm new to web programming Let me see more or less like this:
I have this doubt because at the beginning the page will be blank and the content will change according to the search made by each person. This is my code from the main page:
<form action="busqueda.php" method="get">
<input type="text" name="buscar" value placeholder="Buscar"/>
<input type="submit" name="enviar" value="buscar"></input>
</form>
and this is the code of the search page:
<html>
<head>
<meta charset="utf-8">
<title>Documento sin título</title>
</head>
<?php
$db_host="localhost";
$db_nombre="diccionario";
$db_usuario="root";
$db_contra="";
$conexion=mysqli_connect($db_host,$db_usuario,$db_contra,$db_nombre);
mysqli_set_charset($conexion,"utf8");
$busqueda=$_GET["buscar"];
$palabra;
$definicion;
$consulta="select * from significados where palabra='$busqueda'";
$resultado=mysqli_query($conexion,$consulta);
while($fila=mysqli_fetch_array($resultado,MYSQLI_ASSOC))
{
$palabra=$fila["palabra"];
$definicion=$fila["definicion"];
}
?>
<body>
<div>
<?php echo $palabra;
?>
</div>
<div>
<?php echo $definicion;
?>
</div>
</body>
</html>