This is a discussion on Login page within the PHP Language forums, part of the PHP Programming Forums category; I tried to make a login page, and store all the required information so that the user will not be ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I tried to make a login page, and store all the required information so that
the user will not be able to go directly to a non-authorized page, but the whole idea was a failure. Does anybody know where I can find a script like that? Thanks in advance Aristotelis |
|
|||
|
I noticed that Message-ID: <1113979607.129784@athnrd02> from Pitaridis
Aristotelis contained the following: >I tried to make a login page, and store all the required information so that >the user will not be able to go directly to a non-authorized page, but the >whole idea was a failure. No it wasn't, you successfully found out something did not work. Why not post your idea and let's see what's wrong with it? -- Geoff Berrow (put thecat out to email) It's only Usenet, no one dies. My opinions, not the committee's, mine. Simple RFDs http://www.ckdog.co.uk/rfdmaker/ |
|
|||
|
Pitaridis Aristotelis wrote:
> I tried to make a login page, and store all the required information so that > the user will not be able to go directly to a non-authorized page, but the > whole idea was a failure. Does anybody know where I can find a script like > that? > > Thanks in advance > Aristotelis > > The html script that collects the data should include something like: <form action="goval.php" method="POST"> <table align="center" border="8" bgcolor=Silver> <tr class="required"> <td class="lbl">Your Login ID:</td> <td class="inp"><input type="text" name="ac" size="32" maxlength="32"></td> </tr> <tr class="required"> <td class="lbl">Your Password </td> <td class="inp"><input type="password" name="password" size="32" maxlength="32"></td> </tr> </table> <br><br> <div align="center"> <input value="Sign in" type="submit"> </div> </form> Your php program (in this case named goval.php) should include: ////////////////////////////// // Check for presence of valid input $ac = $_POST['ac']; $password = $_POST['password']; if (empty($ac)) { echo "goval - missing input parameters"; echo "ac: " . $_POST['ac'] . "<br>"; } /////////////////////////////////// // operations using the variables that were passed in. if ( $password == '' ) { $password = change_password_function($ac); |