<?php
include_once("config.php");
include_once("class_register.php");
include_once("class_db_connect.php");
if(!empty($_POST['submit_register']))
{
if( empty($_POST['username']) || empty($_POST['password']) || empty($_POST['firstname']) ||
empty($_POST['lastname']) || empty($_POST['street_address']) || empty($_POST['zipcode']) || empty($_POST['country'])
|| empty($_POST['age']) || empty($_POST['gender']) || empty($_POST['phone']) || empty($_POST['email'])) {
print $MSG_ERROR_REGISTER = "Please enter the correct information<br>";
}
else {
include_once("class_register.php");
$obj = new Register();
$obj->AddUser($_POST['username'], $_POST['password'], $_POST['firstname'], $_POST['lastname'],
$_POST['street_address'], $_POST['zipcode'], $_POST['country'],$_POST['city'], $_POST['age'], $_POST['gender'], $_POST['phone'], $_POST['email']);
}
}
?>
<fieldset style="width:410px;"><legend>USER REGISTRATION</legend>
<form action="" method="post">
<table align="center" width="400" border="1" width="381" cellspacing="0" cellpadding="5">
<tr>
<td width="181">USERNAME:</td>
<td width="174"><input name="username" type="text" maxlength="20" value=""></td>
</tr>
<tr>
<td>PASSWORD:</td>
<td><input name="password" type="password" maxlength="20" value=""></td>
</tr>
<tr>
<td>CONFIRM_PASSWORD:</td>
<td><input name="username" type="confpassword" maxlength="20" value=""></td>
</tr>
<tr>
<td>FIRSTNAME</td><td><input name="firstname" maxlength="50" /></td>
</tr>
<tr>
<td>LASTNAME</td><td><input name="lastname" maxlength="50" /></td>
</tr>
<td>Birt Date:</td>
<td><input name="age" type="text" maxlength="20" value=""></td>
</tr>
<tr>
<td>GENDER</td>
<td><input name="gender" type="radio" value="m"><input name="gender" type="radio" value="f"></td>
</tr>
<tr>
<td>STREET_ADDRESS</td><td><input name="street_address" maxlength="50" /></td>
</tr>
<tr>
<td>COUNTRY</td>
<td><input name="country" type="text" maxlength="20" value=""></td>
</tr>
<tr>
<td>CITY</td>
<td><input name="city" type="text" maxlength="20" value=""></td>
</tr>
<tr>
<td>ZIP CODE</td>
<td><input name="zipcode" type="text" maxlength="20" value=""></td>
</tr>
<tr>
<td>PHONE</td>
<td><input name="phone" type="text" maxlength="20" value=""></td>
</tr>
<tr>
<td>EMAIL</td>
<td><input name="email" type="text" maxlength="20" value=""></td>
</tr>
<tr>
<td></td>
<td><input name="submit_register" type="submit" maxlength="20" value="REGISTR"></td>
</tr>
</table>
</form>
</fieldset>
|