My query is the following, I need to address to the same page that is created in php with html code, and within it I have a validation form via post, when I send the post to the same page that is index, valid those fields with php, then if there is an error I do a header location to the same page where I send via get an? id = error, but when the page is reloaded it remains in the beginning and I need to go down to the id where is the form . How can I do it?
<?php
if(empty($_POST['usuario']))
{
header("Location:index.php?id=contacto&num=1");
?>
?>
codigo principal.....
<!-- formulario de contacto 60 lineas mas abajo -->
<div id="contacto">
<form method="POST">
<?php
if(num=="1")
{
//muestro mensaje de error
}
?>
<input name"usuario">
<input type="submit">
Well that's the idea, thank you in advance.