Good afternoon, I have a question Is this command correct?
http://localhost/site/index.php#contato?info=Email%20Vazio
index.php # contact? info = Email% 20Value
This is the function that sends the command but the page is at the top and the message no longer appears on the form.
private function setNome($nome){
if(!empty($nome)){
$validar = new Validar($nome);
$this->nome = $validar->getValidado();
}else{
$this->setError("Nome Vazio");
return print "<script language='JavaScript'>location.href='"
. "index.php#contato?info={$this->getError()}'</script>";
exit();
}
If I remove the #contato
, it works but I'd like it to go straight to the form so that the user does not have to scroll down the page again at every typo