Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login script to redirect to specifc pages based on username?

Status
Not open for further replies.

anelka9

Technical User
Joined
Apr 30, 2002
Messages
3
Location
SG
i've found this free/gpl script 'vAuthuenticate', which features PHP login n logoff and secure pages. Plus a admin login with add/delete user panel for mysql db.

vAuthuenticate

But what i need is the part where after you login, the script sends you to your own user page by validating your username. eg.my username is blabla79, so the script returns me to my url
Are there any ready scripts for this purpose?
 
Why not just modify the script you already have to add the new feature?

Add another column to the MySQL user table, which specifies the user's default URL. Then modify the login script so that it sends the browser a "Location" header when the login is successful.

You'll also have to make changes to the admin section to give it the ability to maintain that URL column in the user table.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
tats a great start now. but technically, how do i do that ? I'm pretty not a C pro 'programmer' myself and php newbie too. Please help.
 
You roll up your sleeves and start learning PHP. The PHP online manual will be a big help -- it's well-organized and has lots of example code.

In terms of specifics...

Adding the extra column to the table? You should use your preferred MySQL admin tool.

Fetching the extra column from the table? You have the original query the script sends to MySQL. Adding the extra column to the result set and manipulating that column's value can be done using the original code as a template.

Redirecting the browser? Check out PHP's header() function, paying attention to the example code on that page.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
thanx man, for the in depth. I'll be back for more questions. ;p
 
maybe adding a link to the MySSQL Manual will also help the man to learn to fish ;-)

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top