I'm trying to register with an HTML form, here's what i've got so far:
I have the form in a file under
http://localhost/hospital/administrador/registrar-usuario/index.phpThis is sent to a file where I check, clean, etc the variables introduced, This file is under
http://localhost/hospital/administrador/registrar-usuario/verify.phpWhat I want is that if the user makes mistake, I create a session with an array of errors in it and the values the user previuosly entered. Then
header('Location: .');redirect them to theindex.php. So I can display the erros and save the values of the form, so there's no need to rewrite them all.Here's the problem: at the beggining of the
index.phpI check whether the user came from theverify.phppage or not. If they don't the session with the values and errors destroys. But theHTTP_REFERERsays that the referer ishttp://localhost/hospital/administrador/registrar-usuario/index.phpinstead ofverify.php
Any ideas of what's going on?
Thanks a lot!!
Is there any other way I can achieve this?