Your form is valid. Only thing that comes to my mind is, after seeing your full html, is that you're passing your "default" value (which is not set!) instead of selecting something. Try as suggested by @Vina in the comment, i.e. giving it a selected option, or writing a default value
<select name="gender">
<option value="default">Select </option>
<option value="male"> Male </option>
<option value="female"> Female </option>
</select>
OR
<select name="gender">
<option value="male" selected="selected"> Male </option>
<option value="female"> Female </option>
</select>
When you get your $_POST vars, check for them being set; you can assign a default value, or just an empty string in case they're not there.
Most important thing, AVOID SQL INJECTIONS:
//....
$fname = isset($_POST["fname"]) ? mysql_real_escape_string($_POST['fname']) : '';
$lname = isset($_POST['lname']) ? mysql_real_escape_string($_POST['lname']) : '';
$email = isset($_POST['email']) ? mysql_real_escape_string($_POST['email']) : '';
you might also want to validate e-mail:
if($mail = filter_var($_POST['email'], FILTER_VALIDATE_EMAIL))
{
$email = mysql_real_escape_string($_POST['email']);
}
else
{
//die ('invalid email address');
// or whatever, a default value? $email = '';
}
$paswod = isset($_POST["paswod"]) ? mysql_real_escape_string($_POST['paswod']) : '';
$gender = isset($_POST['gender']) ? mysql_real_escape_string($_POST['gender']) : '';
$query = mysql_query("SELECT Email FROM users WHERE Email = '".$email."')";
if(mysql_num_rows($query)> 0)
{
echo 'userid is already there';
}
else
{
$sql = "INSERT INTO users (FirstName, LastName, Email, Password, Gender)
VALUES ('".$fname."','".$lname."','".$email."','".paswod."','".$gender."')";
$res = mysql_query($sql) or die('Error:'.mysql_error());
echo 'created';