PHP Classes

File: forms/user_signin.php

Recommend this page to a friend!
  Classes of johno dread   Custom Form Validation   forms/user_signin.php   Download  
File: forms/user_signin.php
Role: Auxiliary script
Content type: text/plain
Description: sign in form
Class: Custom Form Validation
Validate form values according to several rules
Author: By
Last change:
Date: 14 years ago
Size: 1,517 bytes
 

Contents

Class file image Download
<?php

/**
 * @copyright 2010
 */

?>
<p id='msg' style='color:red;'> <?php echo isset($error)?$error:'';?> </p>


<style>

#form_error, #req
{
    color:red;
   
}
#form_error
{
    border: 1px solid red;
    background:light red;
    width: 220px;
    padding:2px;
    text-align: center;
    margin-left:20px;
}
.boxes{
    width:200px;
}

p.error
{

    color:#EE2037;
    margin-top:0;
    overflow:hidden;
    font-size: .9em;
    padding-left:5px;
    width:200px;
}

</style>


<!-- TODO: Add te following fields
address, secondary address, city, state, zip, birthdate,

checkbox for mailing list, checkbox for tos and privacy policy,
 -->

<form method = "post" id="signup" action="<?php echo $_SERVER['PHP_SELF'];?>">

    <h2>Sign In</h2>
<table>

<tr><td align="right">Email:</td><td><input class="boxes" type="text" name="email" maxlength="128" value = "<?php echo isset($_POST['email'])?$_POST['email']:''; ?>"/><span id="req">*</span><?php echo (isset($_SESION['failed_array']['email']))?'<p class = error>'.$_SESION['failed_array']['email'].'</p>' : '' ; ?></td><td>&nbsp;</td></tr>
<tr>
    <td align="right">Password:</td>
    <td><input class="boxes" type="text" name="password" maxlength="20" value = ""/><span id="req">*</span> <?php echo (isset($_SESION['failed_array']['password']))?'<p class = error>'.$_SESION['failed_array']['password'].'</p>' : '' ; ?></td>
</tr>
<tr><td>&nbsp;</td><td> <input id ="terms" type="submit" value="Sign Up"/></td></tr>
</table>

</form>