Jump to content

Change Login


bev

Recommended Posts

I want to change the code below from using an email address to login to using company name to login. What would I change here.

 


<?
$Level="";
include($Level."includes/global_inc.php");
if($_GET[act]=="a"){ $msg="Registered Successfully!!";}
if($_POST[btnSubmit]=="Submit")
{

$select=mysql_query("select * from user_registration where email='$_POST[email]' and pword='$_POST[password]'");
$num=mysql_num_rows($select);
if($num==1)	
{
$sel=mysql_fetch_object($select);
if($sel->approval==1)
		{

			$_SESSION[uid]=$sel->id;
			$_SESSION[uemail]=$sel->email;
			echo "<script>window.location.href='memberpage.php'</script>";
		}
elseif($sel->approval==2)
		{

			$_SESSION[aid]=$sel->id;
			$_SESSION[aname]=$sel->email;
			echo "<script>window.location.href='wornadmin.php'</script>";
		}
		else
		{
			$msg="User Not Activated";
		}	
}
else
{
		$msg="Invalid User Name & Password";
}
}

?>
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">

<html>
<link rel="stylesheet" href="includes/style.css" type="text/css" />

<head>



<title>WORN PANTY GIRLS</title>



<meta name="description" content="PANTY DESIRE - Hourly Updated FREE Panty Galleries">

<meta name="keywords" content="panty, panties, upskirt, legs, ass, girls, free, pictures">

<!--<style type="text/css">

<!--

* {padding: 0; margin: 0;}

body {font: 11px Verdana, Arial, sans-serif;}

a {font-family: Verdana, Arial, sans-serif; color: #3366FF; text-decoration: none;}

a:hover {text-decoration: underline;}



.block {margin: auto; width: 900px; }

.block img {margin: 2px; float: center; width: 135px; height: 175px; border: 1px solid #A73E9D;}



.footer {margin: auto; width: 790px; font: 11px Verdana, Arial, sans-serif; color: black}



h1 {margin-bottom: 0px; font: bold 25px Verdana, Arial, sans-serif; color: #09C;}

h3 {font: bold 17px Verdana, Arial, sans-serif; color: #09C;}

body

{ scrollbar-face-color: #660033;

   scrollbar-highlight-color: #CC0099;

   scrollbar-shadow-color: #330000;

   scrollbar-3dlight-color: #330000;

   scrollbar-arrow-color: #CC0099;

   scrollbar-track-color: #B22763;

   scrollbar-darkshadow-color: #1B1E25;

}

a.topup:link, a.topup:visited {

        FILTER: DropShadow(Color=#660033, OffX=1, OffY=1, Positive=1);

        FONT-SIZE: 18pt;

        COLOR: #ffffff;

        HEIGHT: 12px;

        font-weight:bolder;

        text-decoration: none

}

a.topup:active, a.topup:hover {

        text-decoration: underline;

.style1 {color: #660033}

.style14 {

font-size: 36px;

font-family: IronMan;

}

#Layer1 {

position:absolute;

left:53px;

top:381px;

width:932px;

height:26px;

z-index:1;

}

.style15 {color: #000000}


</style>-->



<script type="text/javascript">

<!--

document.cookie='atref=noref$#; path=/;'

// -->

</script>





<script 

	language="JavaScript" 

	src="Banner%20Rotator/magicimage.js" 

	type="text/javascript">

</script>









</head>



<body bgcolor='#FF77A5' leftMargin="0" topMargin="0" marginwidth="0" marginheight="0">

<SCRIPT language=JavaScript>

/*

Milonic DHTML Website Navigation Menu

Written by Andy Woolley, e-mail menu3@milonic.com

Copyright 2002 (c) Milonic Solutions Ltd. All Rights Reserved.

You may use this menu on your web site free of charge as long as you 

place a link to http://www.milonic.co.uk/menu and copyright notices remain in place.

Commercial support contracts are available on request if you cannot comply with the above rules.		

*/

// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/

</SCRIPT>	

<SCRIPT language=JavaScript src="menu%20script/menu_array.js" type=text/javascript></SCRIPT>

<SCRIPT language=JavaScript src="menu%20script/mmenu.js" type=text/javascript></SCRIPT>



<table width="100%" align="center" cellpadding="0" cellspacing="0">
<? include($Level."includes/top.php"); ?>

  <tr>

    <td background="http://www.wornpantygirls.com/images/bar-dwn.jpg"> </td>

    <td bgcolor="#CC6699"><div align="center">

      <table width="100%" bordercolor="#CC99FF">

        <tr>

          <? include($Level."includes/left.php"); ?>

          <td width="44%" valign="top"><div align="center">
	  <table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td><form name="login" action="" method="post">
      <table width="100%" border="0" cellspacing="2" cellpadding="2" class="stylet16">
        <tr>
          <td align="center"><table width="100%" border="0" cellspacing="7" cellpadding="2" class="stylet16">
            <tr>
              <td colspan="2" class="style26"> </td>
            </tr>
            <tr>
              <td colspan="2" class="style26"> </td>
            </tr>
            <tr>
              <td colspan="2" class="style26"> </td>
            </tr>
            <tr>
              <td colspan="2" class="style26"> </td>
            </tr>
            <tr>
              <td colspan="2" class="style26"><?=$msg?><?=$useralready?></td>
            </tr>
            <tr>
              <td colspan="2" class="style23">Login Form : </td>
            </tr>
            <tr>
              <td width="42%" align="right">User ID  :</td>
              <td width="58%"><input type="text" name="email" value="<?=$_POST[email]?>">              </td>
            </tr>
            <tr>
              <td align="right">Password : </td>
              <td><input type="text" name="password" value="<?=$_POST[password]?>"></td>
            </tr>
            <tr>
              <td colspan="2" align="center">
                <input type="submit" name="btnSubmit" value="Submit" onClick="return logincheck();">              </td>
              </tr>
          </table>
          <table width="100%" border="0" cellspacing="7" cellpadding="2" class="stylet16">
            <tr>
              <td class="style26"> </td>
            </tr>
            <tr>
              <td class="style26"> </td>
            </tr>
            <tr>
              <td class="style26"> </td>
            </tr>
            <tr>
              <td class="style26"> </td>
            </tr>
            <tr>
              <td class="style26"> </td>
            </tr>
            <tr>
              <td class="style26"> </td>
            </tr>
            <tr>
              <td class="style26"> </td>
            </tr>
          </table></td>
        </tr>
      </table>
  </form></td>
  </tr>
</table>

	  </div></td>

          <td width="29%"><center>
          </center>

        </tr>

        <tr>

          <td height="21" colspan="3"><table width="100%">

          </table></td>

          </tr>

      </table>
<? include($Level."includes/bottom.php");?>
    </div></td>

    <td background="http://www.wornpantygirls.com/images/bar-dwn.jpg"> </td>

  </tr>

</table>
  
      
</body>

</html>


 

 

Link to comment
Share on other sites

darkfreaks was looking at the code. Asked me to put up that post. I guess so he would not look like the dumb_ss that he wants to call everyone else.  Not a pleasant person to try and work with at all. Very rude..

 

darkfreaks Learn how to just say you cant do something instead of telling others they are stupid.

Link to comment
Share on other sites

well first i would creat session to get company name instead of email $_SESSION[uemail]=$sel->email;

 

<?
$Level="";
include($Level."includes/global_inc.php");
if($_GET[act]=="a"){ $msg="Registered Successfully!!";}
if($_POST[btnSubmit]=="Submit")
{

$select=mysql_query("select * from user_registration where company_name='$_POST[company_name]' and pword='$_POST[password]'");
$num=mysql_num_rows($select);
if($num==1)   
{
   $sel=mysql_fetch_object($select);
   if($sel->approval==1)
         {
         
            $_SESSION[uid]=$sel->id;
            $_SESSION[uemail]=$sel->email;
            echo "<script>window.location.href='memberpage.php'</script>";
         }
   elseif($sel->approval==2)
         {
         
            $_SESSION[aid]=$sel->id;
            $_SESSION[aname]=$sel->email;
            echo "<script>window.location.href='wornadmin.php'</script>";
         }
         else
         {
            $msg="User Not Activated";
         }   
}
else
{
         $msg="Invalid User Name & Password";
}
}

?>
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">

<html>
<link rel="stylesheet" href="includes/style.css" type="text/css" />

<head>



<title>WORN PANTY GIRLS</title>



<meta name="description" content="PANTY DESIRE - Hourly Updated FREE Panty Galleries">

<meta name="keywords" content="panty, panties, upskirt, legs, ass, girls, free, pictures">

<!--<style type="text/css">

<!--

* {padding: 0; margin: 0;}

body {font: 11px Verdana, Arial, sans-serif;}

a {font-family: Verdana, Arial, sans-serif; color: #3366FF; text-decoration: none;}

a:hover {text-decoration: underline;}



.block {margin: auto; width: 900px; }

.block img {margin: 2px; float: center; width: 135px; height: 175px; border: 1px solid #A73E9D;}



.footer {margin: auto; width: 790px; font: 11px Verdana, Arial, sans-serif; color: black}



h1 {margin-bottom: 0px; font: bold 25px Verdana, Arial, sans-serif; color: #09C;}

h3 {font: bold 17px Verdana, Arial, sans-serif; color: #09C;}

body

{ scrollbar-face-color: #660033;

   scrollbar-highlight-color: #CC0099;

   scrollbar-shadow-color: #330000;

   scrollbar-3dlight-color: #330000;

   scrollbar-arrow-color: #CC0099;

   scrollbar-track-color: #B22763;

   scrollbar-darkshadow-color: #1B1E25;

}

a.topup:link, a.topup:visited {

        FILTER: DropShadow(Color=#660033, OffX=1, OffY=1, Positive=1);

        FONT-SIZE: 18pt;

        COLOR: #ffffff;

        HEIGHT: 12px;

        font-weight:bolder;

        text-decoration: none

}

a.topup:active, a.topup:hover {

        text-decoration: underline;

.style1 {color: #660033}

.style14 {

   font-size: 36px;

   font-family: IronMan;

}

#Layer1 {

   position:absolute;

   left:53px;

   top:381px;

   width:932px;

   height:26px;

   z-index:1;

}

.style15 {color: #000000}


</style>-->



<script type="text/javascript">

<!--

document.cookie='atref=noref$#; path=/;'

// -->

</script>





<script

      language="JavaScript"

      src="Banner%20Rotator/magicimage.js"

      type="text/javascript">

</script>









</head>



<body bgcolor='#FF77A5' leftMargin="0" topMargin="0" marginwidth="0" marginheight="0">

<SCRIPT language=JavaScript>

/*

Milonic DHTML Website Navigation Menu

Written by Andy Woolley, e-mail menu3@milonic.com

Copyright 2002 (c) Milonic Solutions Ltd. All Rights Reserved.

You may use this menu on your web site free of charge as long as you

place a link to http://www.milonic.co.uk/menu and copyright notices remain in place.

Commercial support contracts are available on request if you cannot comply with the above rules.      

*/

// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/

</SCRIPT>   

<SCRIPT language=JavaScript src="menu%20script/menu_array.js" type=text/javascript></SCRIPT>

<SCRIPT language=JavaScript src="menu%20script/mmenu.js" type=text/javascript></SCRIPT>



<table width="100%" align="center" cellpadding="0" cellspacing="0">
<? include($Level."includes/top.php"); ?>

  <tr>

    <td background="http://www.wornpantygirls.com/images/bar-dwn.jpg"> </td>

    <td bgcolor="#CC6699"><div align="center">

      <table width="100%" bordercolor="#CC99FF">

        <tr>

          <? include($Level."includes/left.php"); ?>

          <td width="44%" valign="top"><div align="center">
        <table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td><form name="login" action="" method="post">
      <table width="100%" border="0" cellspacing="2" cellpadding="2" class="stylet16">
        <tr>
          <td align="center"><table width="100%" border="0" cellspacing="7" cellpadding="2" class="stylet16">
            <tr>
              <td colspan="2" class="style26"> </td>
            </tr>
            <tr>
              <td colspan="2" class="style26"> </td>
            </tr>
            <tr>
              <td colspan="2" class="style26"> </td>
            </tr>
            <tr>
              <td colspan="2" class="style26"> </td>
            </tr>
            <tr>
              <td colspan="2" class="style26"><?=$msg?><?=$useralready?></td>
            </tr>
            <tr>
              <td colspan="2" class="style23">Login Form : </td>
            </tr>
            <tr>
              <td width="42%" align="right">User ID  :</td>
              <td width="58%"><input type="text" name="email" value="<?=$_POST[company_name]?>">              </td>
            </tr>
            <tr>
              <td align="right">Password : </td>
              <td><input type="text" name="password" value="<?=$_POST[password]?>"></td>
            </tr>
            <tr>
              <td colspan="2" align="center">
                <input type="submit" name="btnSubmit" value="Submit" onClick="return logincheck();">              </td>
              </tr>
          </table>
          <table width="100%" border="0" cellspacing="7" cellpadding="2" class="stylet16">
            <tr>
              <td class="style26"> </td>
            </tr>
            <tr>
              <td class="style26"> </td>
            </tr>
            <tr>
              <td class="style26"> </td>
            </tr>
            <tr>
              <td class="style26"> </td>
            </tr>
            <tr>
              <td class="style26"> </td>
            </tr>
            <tr>
              <td class="style26"> </td>
            </tr>
            <tr>
              <td class="style26"> </td>
            </tr>
          </table></td>
        </tr>
      </table>
     </form></td>
  </tr>
</table>

        </div></td>

          <td width="29%"><center>
          </center>

        </tr>

        <tr>

          <td height="21" colspan="3"><table width="100%">

          </table></td>

          </tr>

      </table>
<? include($Level."includes/bottom.php");?>
    </div></td>

    <td background="http://www.wornpantygirls.com/images/bar-dwn.jpg"> </td>

  </tr>

</table>

     
</body>

</html>

 

that should do it .. well iv called your posts ect company_name.. and i would change select * from user_registration where company_name='$_POST[company_name]' ... where company_name  to what ever it is in your db

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.