Zubrag.com
May 22, 2012, 09:02:56 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: username and password script  (Read 1801 times)
dsjoes
Newbie
*
Posts: 2


« on: June 04, 2010, 05:31:35 pm »

i am using the password-protect script http://www.zubrag.com/scripts/password-protect.php it is working fine but what do i need to do to make it fit in with my website design. so that it asks for username and password.

Logged
zubrag
Administrator
Hero Member
*****
Posts: 753


WWW
« Reply #1 on: June 05, 2010, 01:35:01 am »

I think this topic should be of help

http://www.zubrag.com/forum/index.php/topic,94.0.html
Logged
dsjoes
Newbie
*
Posts: 2


« Reply #2 on: June 05, 2010, 05:33:15 am »

that is just for entering the password i need the username aswell. and does it get the username and password from the password protect script or from another.

sorry i am new to this
Logged
zubrag
Administrator
Hero Member
*****
Posts: 753


WWW
« Reply #3 on: June 07, 2010, 02:50:26 am »

Actually this is for username and password.
Logged
camado
Newbie
*
Posts: 2


« Reply #4 on: June 17, 2010, 07:52:51 pm »

I'm also having trouble with integrating the login into my web design. The login works if I just use the code as is. I attempted following the instructions: http://www.zubrag.com/forum/index.php/topic,94.0.html with no success. I also looked at the source code for the Design Brand website.

I'm trying to understand how to follow this direction: " Instead of above code insert your custom html code, and insert following in the place where you want login form:"

What exactly needs to be deleted out of password_protect.php?  The entire function function showLoginPasswordProtect or some subset of the code?  Or do I copy my html from my login form and into the password_protector.php file?

I apologize if these are questions with obvious answers. I'm building a website for a friend as a favor (i.e. for free) and and completely new to php.



Logged
zubrag
Administrator
Hero Member
*****
Posts: 753


WWW
« Reply #5 on: June 18, 2010, 01:35:13 am »

Only following code needs to be replaced with your custom html
Code:
<html>
<head>
  <title>Please enter password to access this page</title>
  <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
  <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
</head>
<body>
  <style>
    input { border: 1px solid black; }
  </style>
  <div style="width:500px; margin-left:auto; margin-right:auto; text-align:center">
  <form method="post">
    <h3>Please enter password to access this page</h3>
    <font color="red"><?php echo $error_msg?></font><br />
<?php if (USE_USERNAME) echo 'Login:<br /><input type="input" name="access_login" /><br />Password:<br />'?>
    <input type="password" name="access_password" /><p></p><input type="submit" name="Submit" value="Submit" />
  </form>
  <br />
  <a style="font-size:9px; color: #B0B0B0; font-family: Verdana, Arial;" href="http://www.zubrag.com/scripts/password-protect.php" title="Download Password Protector">Powered by Password Protect</a>
  </div>
</body>
</html>

and this code needs to be placed in your custom html where you want login form
  <form method="post">
    <font color="red"><?php echo $error_msg; ?></font><br />
<?php if (USE_USERNAME) echo 'Login:<br /><input type="input" name="access_login" /><br />Password:<br />'; ?>
    <input type="password" name="access_password" /><p></p><input type="submit" name="Submit" value="Submit" />
  </form>
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC