Page 1 of 1

simple problem in login page

Posted: Mon Sep 05, 2005 1:57 am
by eshban
hi,
i make a simple login page, if user successfully enters valid username and password, then it redirects to a welcome page, otherwise i want that my program shows an alert(javascript), and re-directs to the login page again.

i forget the script, its just like document.history(-1)


plz reply

Posted: Mon Sep 05, 2005 2:03 am
by feyd
"document.history(-1)" is not a redirection, fyi.

if you want to use Javascript to do the "redirection" document.location is the object to go through (giving it the url to go to), or you could do it in php using header(), or with a meta-refresh (HTML)

Code: Select all

<meta http-equiv="refresh" content="10; url=http://yoursite.com" />