Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Different member different page::Need Help
Old 10-12-2007, 08:24 AM Different member different page::Need Help
Kushal's Avatar
Experienced Talker

Posts: 48
Trades: 0
Hello guys

I need some help.
I have some members(X, Y, Z) and they all have their own username and password. Now I want to send them to their own page after they login with their username and password. For example: when MR. X input his correct username and password he will reach his own page (mrXpage.html) likewise when MR. Y input his correct username and password he will reach his own page (mrYpage.html). Is their any secure way of doing this? I want to do this with php or .htaaccess without mysql database.

I have made one java script to do this process which is not secure at all, I want some secure technique---------here is my java script------------

Code:
<html>

<head>
<title>New Page 1</title>
<SCRIPT LANGUAGE="JavaScript">



<!-- Begin
function Login(){
var done=0;
var username=document.login.username.value;
username=username.toLowerCase();
var password=document.login.password.value;
password=password.toLowerCase();
if (username=="memberX" && password=="passwordX") { window.location="Xpage.html"; done=1; }
if (username=="memberY" && password=="passwordY") { window.location="Ypage.html"; done=1; }
if (username=="Zmember" && password=="passwordZ") { window.location="Zpage.html"; done=1; }
if (done==0) { alert("Invalid login!"); }
}
// End -->
</SCRIPT>
</head>

<body>
<center>
<form name=login>
<table width=225 border=1 cellpadding=3>
<tr><td colspan=2><center><font size="+2"><b>Members-Only Area!</b></font></center></td></tr>
<tr><td>Username:</td><td><input type=text name=username size="20"></td></tr>
<tr><td>Password:</td><td><input type=text name=password size="20"></td></tr>
<tr><td colspan=2 align=center><input type=button value="Login!" onClick="Login()"></td></tr>
</table>
</form>
</center>

</body>

</html>
__________________

Please login or register to view this content. Registration is FREE
Kushal is offline
Reply With Quote
View Public Profile Visit Kushal's homepage!
 
 
Register now for full access!
Old 10-12-2007, 10:48 AM Re: Different member different page::Need Help
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
Well, javascript is not PHP, nor is it secure.

Post the information to a PHP file that sets sessions and if the session is correct show a different page.

Also, I think I can code this for you...PM'ed you my MSN.
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE

Last edited by rogem002; 10-12-2007 at 10:50 AM..
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Reply     « Reply to Different member different page::Need Help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30515 seconds with 12 queries