I have a problem with ...
header ("Location :".$_ SERVER ['HTTP_REFERER']);
开发者_开发百科I get the following error:
Error 310 (net:: ERR_TOO_MANY_REDIRECTS)
I'm trying to start session and where it was redirected to the user.
There are a safer alternative?
You have done an infinite loop. You are redirecting your visitor to the page where he comes from. If you open the page, it creates an infinite loop, trying to redirect itself.
Can you be more explicit in you question? With "secion" are you trying to say "session"?
Update: your code is working properly. The question is incomplete since the HTTP redirect has no relation with sessions, or users.
Maybe you can be interested in reading: PHP sessions - PHP redirects
精彩评论