<?php
include("include/connection.php");
session_start();
if($_SERVER["REQUEST_METHOD"] == "POST")
{
// username and password sent from Form
$myusername=addslashes($_POST['username']);
$mypassword=addslashes($_POST['password']);

$sql="SELECT * FROM customer WHERE user='$myusername' and pass='$mypassword'";
$result=mysql_query($sql) or die(mysql_error());;
$row=mysql_fetch_array($result);
$active=$row['active'];
$count=mysql_num_rows($result);


// If result matched $myusername and $mypassword, table row must be 1 row
if($count==1)
{
session_register("myusername");
$_SESSION['login_user']=$myusername;

header("location: uploadads.php");
}
else
{
echo $error="Your Login Name or Password is invalid";
}
}
?>


<!doctype html>

<html lang="en-US">
<head>
<meta charset="UTF-8" />
<title>addfreeads</title>

<link href="style.css" rel="stylesheet" type="text/css">

<style type="text/css">
<!--
.style13 {color: #333333; }
.style14 {
color: #666666;
}
-->
</style>
<script type="text/javascript">
$(document).ready(function(){
$('#submit').click(function(){
var username=$('#username').val();
var password=$('#password').val();

if(username=="")
{
$('#dis').slideDown().html("<span>Please type Username</span>");
return false;
}
if(password=="")
{
$('#dis').slideDown().html('<span id="error">Please type Password</span>');
return false;
}
});
});
</script>
</head>

<body>
<div id="wrap">
<section id="left">
<header id="mainheader">
<img src="images/logo.jpg" width="250" height="120" >
</header>




<section id="sidebar">
<div class="sb-block" style="border:inset 5px #665e52; padding:0;">

<label id="dis"> </label><br>
<h2>LOGIN</h2>
<form smethod="post" action="">

<label>UserName:</label>
<input type="text" name="username" id="username"/><br /><br /><br />
<label>Password :</label>
<input type="password" name="password" id="password"/><br /><br />
<br/>
<input type="submit" value="submit" id="submit" /><br /><br />
</form>
</div>

this validation not working it dont show the error message for fack information
plz say solution for this problem