Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2012
    Posts
    12
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Unhappy problem with login.

    Im using the codes from http://www.phpwebcommerce.com/

    However there are some error in it, esp in
    admin/login.php

    Code:
    <?php
    require_once '../library/config.php';
    require_once './library/functions.php';
    
    $errorMessage = '&nbsp;';
    
    if (isset($_POST['txtUserName'])) {
    	$result = doLogin();
    	
    	if ($result != '') {
    		$errorMessage = $result;
    	}
    }
    
    ?>
    <html>
    <head>
    <title>Shop Admin - Login</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="include/admin.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <table width="750" border="0" align="center" cellpadding="0" cellspacing="1" class="graybox">
     <tr> 
      <td><img src="include/banner-top.gif" width="750" height="75"></td>
     </tr>
     <tr> 
      <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="20">
        <tr> 
         <td class="contentArea"> <form method="post" name="frmLogin" id="frmLogin">
           <p>&nbsp;</p>
           <table width="350" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#336699" class="entryTable">
            <tr id="entryTableHeader"> 
             <td>:: Admin Login ::</td>
            </tr>
            <tr> 
             <td class="contentArea"> 
    		 <div class="errorMessage" align="center"><?php echo $errorMessage; ?></div>
    		  <table width="100%" border="0" cellpadding="2" cellspacing="1" class="text">
               <tr align="center"> 
                <td colspan="3">&nbsp;</td>
               </tr>
               <tr class="text"> 
                <td width="100" align="right">User Name</td>
                <td width="10" align="center">:</td>
                <td><input name="txtUserName" type="text" class="box" id="txtUserName" value="admin" size="10" maxlength="20"></td>
               </tr>
               <tr> 
                <td width="100" align="right">Password</td>
                <td width="10" align="center">:</td>
                <td><input name="txtPassword" type="password" class="box" id="txtPassword" value="admin" size="10"></td>
               </tr>
               <tr> 
                <td colspan="2">&nbsp;</td>
                <td><input name="btnLogin" type="submit" class="box" id="btnLogin" value="Login"></td>
               </tr>
              </table></td>
            </tr>
           </table>
           <p>&nbsp;</p>
          </form></td>
        </tr>
       </table></td>
     </tr>
    </table>
    <p>&nbsp;</p>
    </body>
    </html>
    I couldn't get myself logined in /access
    please do help me, as im really short of time.

  • #2
    Regular Coder
    Join Date
    Sep 2011
    Posts
    428
    Thanks
    18
    Thanked 26 Times in 26 Posts
    Try fixing
    require_once './library/functions.php';
    to
    require_once '../library/functions.php';

    May not be the problem, but could solve any future ones. I didn't look at the other files, I'm just pointing that out right there.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •