simple problem in login page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eshban
Forum Contributor
Posts: 184
Joined: Mon Sep 05, 2005 1:38 am

simple problem in login page

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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" />
Post Reply