franknu Posted November 22, 2006 Share Posted November 22, 2006 What is the best way to to user a password and user name to take the user to another page I want that if a password and user match take the user to a member page what is the best way to do this..here is my member page[code=php:0]<table width="75%" height="351" border="1" cellpadding="0" cellspacing="0"> <tr> <td valign="top"> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td width="34%" height="21">Home</td> </tr> <tr> <td height="21"> <? echo"welcome name of $BusinessName"; ?> </td> </tr> </table> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td width="21%" height="310"><table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td>Advertise your website</td> </tr> <tr> <td> </td> </tr> <tr> <td>Email Marketin</td> </tr> <tr> <td>Add An email </td> </tr> <tr> <td>Messeges</td> </tr> </table></td> <td width="50%" valign="top"> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td>Update my site</td> <td>Add Key words</td> <td>CCBILL</td> </tr> </table></td> <td width="29%" valign="top"> </td> </tr> </table></td> </tr></table>[/code]right now any password or user go right throughhere is my form[code=php:0]<form method="Post" action="member_page.php"><table width="40%" border="0" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC"> <tr> <td height="242"><table width="100%" border="00" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC"> <tr> <td><img src="../images/logo_top.jpg" width="239" height="82"></td> </tr> <tr> <td bgcolor="#FFFFFF"><div align="center"> <p><strong><font size="+1">Administration</font></strong></p> <p> </p> </div></td> </tr> <tr> <td><table width="60%" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#CCCCCC"> <tr> <td width="25%"><font color="#000000"><strong>UserName</strong></font></td> <td width="75%"><font color="#000000"> <input type="User_Name" name="User_Name"> </font></td> </tr> <tr> <td><font color="#000000"><strong>Password</strong></font></td> <td><font color="#000000"> <input type="Password" name="Password"> </font></td> </tr> <tr> <td> </td> <td><table width="102%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="72%" height="53"> <div align="right"> <input type="submit" name="submit" value="Reset"> </div></td> <td width="28%"><input type="submit" name="submit2" value="LogMeIn"></td> </tr> </table></td> </tr> <tr> <td> </td> <td><strong><a href="login1.php">Forgot my Password</a></strong></td> </tr> </table></td> </tr> </table></td> </tr></table></form>[/code] Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted November 22, 2006 Share Posted November 22, 2006 Here's a good thread all about that:http://www.phpfreaks.com/forums/index.php/topic,114046.0.html Quote Link to comment Share on other sites More sharing options...
drkslvr8 Posted November 22, 2006 Share Posted November 22, 2006 Personally, I store an individual's record (user name, password, real name, etc.) in a single row in a MySQL table. When someone enters a user name and password, I first check to see if the user name they gave is in the table. If it is, then I check to see if the password they provided matches the user name. If it does, they're in. You can just use and include() statement to bring up the members only page. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.