I did not have a look at pic of your page
but I can imagine Notice Notice ......
I have made the php part hidden, until form is submitted.
First run there has not been any submit = button pressed
so php complains that there are no such 'username' to test.
Have a look here:
<?php
include "db.php"
?>
<html>
<head>
<title>
RippedProvince - Register
</title>
</head>
<body bgcolor="silver">
<form name="login" method="post" action="register.php">
<table border="0" width="225" align="center">
<tr>
<td width="219" bgcolor="#999999">
<p align="center"><font color="white"><span style="font-size:12pt;"><b>Registration</b></span></font></p>
</td>
</tr>
<tr>
<td width="219">
<table border="0" width="282" align="center">
<tr>
<td width="116"><span style="font-size: 10pt; font-family: Tahoma;">Name:</span></td>
<td width="156"><input type="text" name="name" maxlength="15"></td>
</tr>
<tr>
<td width="116"><span style="font-size: 10pt; font-family: Tahoma;">Username:</span></td>
<td width="156"><input type="text" name="username" maxlength="15"></td>
</tr>
<tr>
<td width="116"><span style="font-size: 10pt; font-family: Tahoma;">Password:</span></td>
<td width="156"><input type="password" name="password" maxlength="20"></td>
</tr>
<tr>
<td width="116"><span style="font-size: 10pt; font-family: Tahoma;">Gender:</span></td>
<td>
<select name="gender">
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</td>
</tr>
<tr>
<td width="116"> </td>
<td width="156">
<p align="right"><input type="submit" name="submit" value="Submit"></p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="219" bgcolor="#999999"> </td>
</tr>
</table>
</form>
<font color="silver" face="Tahoma" size="3"><p align="left">SECRET REINFORCED SPAM BARRIER!!</p></font>
<?php
if(isset($_POST['username'])){// if php has got any submitted values to play with
?>
<center>
<table border="0" style="font-size: 10pt; font-family: Tahoma; border: 1px solid black;">
<tr>
<td>
<?php
$first_name = $_POST['name'];
$username = $_POST['username'];
$password = $_POST['password'];
$gender = $_POST['gender'];
?>
</td>
<td>
<?php
if( empty( $first_name ) ) {
echo "You must enter your first name!";
}
?>
</td>
<td>
<?php
if($username == !yes) {
echo "You must enter an username!";
}
?>
</td>
<td>
<?php
if($password = !yes) {
echo "You must enter a password!";
}
?>
</td>
<td>
<?php
if($gender = !yes) {
echo "You must choose your gender!";
}
?>
</td>
</tr>
</table>
</center>
<?php
} // end php checking part
?>
Also this is howto check if field is EMPTY
<?php
if( empty( $first_name ) ) {
echo "You must enter your first name!";
}
?>