0

I am in a pickle and need a solution asap.

I am creating an index page that will have a password form. When the user enters the given password it needs to redirect automatically to another page that is protected by that password.

I don't mind how this works, it could be that the index page is that password protected page, but I would like to be able to style my own password field and submit button.

Does anyone know of a quick and simple solution for this that is fairly secure?

4

2 回答 2

0

对于那些寻求快速解决方案的人,我购买了这款非常理想的产品:

http://codecanyon.net/item/easy-file-protection-php/674633?sso?WT.ac=search_item&WT.seg_1=search_item&WT.z_author=NxtCode

感谢 Ian 的评论,非常感谢。

于 2013-01-23T14:23:58.807 回答
0

好吧,最简单的方法是首先在 HTML 中创建一个包含两个字段的提交表单(一个用于用户名,一个用于密码或任何您想要的)

然后,在表单代码中,将表单重定向到密码等的 PHP 脚本,

登录脚本将使用 PHP 会话(谷歌它)来创建一个新的用户会话并跟踪登录的用户等 像这样的登录表单:

         <table width="950" border="0">
  <tr>
  <td width="200" valign="top">LOGIN;</br>
   <form action="/actions/sessions.php" method="post">
            User:</br><input type="text" name="user" /></br>
Password:</br> <input type="text" name="password" id="password" /></br>
<input type="submit" />
</form></td>

  </td>
  </tr>
  </table>

这是从开始会话并在 MYSQL 数据库中验证用户的 HTML 表单调用的“SESSIONS.PHP”脚本

<?php
// start the session //

session_start();
于 2013-01-23T11:49:08.667 回答