Jump to content

Password and username


franknu

Recommended Posts

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>&nbsp;</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">&nbsp;</td>
        </tr>
      </table></td>
  </tr>
</table>
[/code]

right now any password or user go right through

here 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>&nbsp;</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>&nbsp;</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>&nbsp;</td>
                <td><strong><a href="login1.php">Forgot my Password</a></strong></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</form>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/28048-password-and-username/
Share on other sites

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.
Link to comment
https://forums.phpfreaks.com/topic/28048-password-and-username/#findComment-128828
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.