guys i am not getting the value in mysql table.......? tell me where i am wrong
<?php
include('log.php');
include('search.php');
include('menu.php');
?>
<?php
$con=mysql_connect("localhost","root","");
$db=mysql_select_db("project");
@$a=$_POST['fname'];
@$b=$_POST['email'];
@$c=$_POST['uname'];
@$d=$_POST['country'];
@$e=$_POST['sex'];
@$f=$_POST['mobname'];
@$g=$_POST['pass1'];
@$h=$_POST['pass2'];
if($_POST['submit'])
{
$SQL = "SELECT * FROM tb_login ";
$result = mysql_query($SQL);
$SQL = "INSERT INTO `project`.`tb_login` VALUES ('$a','$b','$c','$d','$e','$f','$g','$h')";
$result = mysql_query($SQL);
echo "Your Data Successfully Saved";
}
?>
<html>
<head></head>
<script language="javascript" type="text/javascript">
function validate()
{
if(document.getElementById("fname").value=="")
{
alert("Please Enter Your Name");
document.getElementById("fname").focus();
return false;
}
var emailPat=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
var emailid=document.getElementById("email").value;
var matchArray = emailid.match(emailPat);
if (matchArray == null)
{
alert("Your email address is wrong. Please try again.");
document.getElementById("email").focus();
return false;
}
if(document.getElementById("uname").value=="")
{
alert("Please Enter Your username ");
document.getElementById("uname").focus();
return false;
}
if(document.getElementById("country").value=="-1")
{
alert("Please Enter Your country ");
document.getElementById("country").focus();
return false;
}
if(document.getElementById("sex").value=="0")
{
alert("Please Enter Your sex ");
document.getElementById("sex").focus();
return false;
}
if(document.getElementById("mobname").value=="")
{
alert("Please Enter mobile number");
document.getElementById("mobname").focus();
return false;
}
if(document.getElementById("pass1").value=="")
{
alert("Please Enter Your Password");
document.getElementById("pass1").focus();
return false;
}
if(document.getElementById("pass2").value=="")
{
alert("Please ReEnter Your Password");
document.getElementById("pass2").focus();
return false;
}
if(document.getElementById("pass2").value!="")
{
if(document.getElementById("pass2").value != document.getElementById("pass1").value)
{
alert("Confirm Password doesnot match!");
document.getElementById("pass2").focus();
return false;
}
}
return true;
}
</script>
<div id="page-wrap">
<a href="index.php">homepage </a>
<form method="post" action="signupform.php" name="validation" onsubmit="return validate();">
<table border="1" align="center" >
<tr>
<td colspan="2">SIGNUP PAGE</td>
</tr>
<tr>
<td>
first name
</td>
<td>
<input type="text" id="fname" />
</td>
</tr>
<tr>
<td>
email
</td>
<td>
<input type="text" id="email" />
</td>
</tr>
<tr>
<td>
username
</td>
<td>
<input type="text" id="uname"/>
</td>
</tr>
<tr>
<td>Country</td>
<td>
<select id="country">
<option value="-1" selected>[choose yours]</option>
<option value="1">USA</option>
<option value="2">UK</option>
<option value="3">INDIA</option>
</select>
</td>
</tr>
<tr>
<td >sex</td>
<td>
<input type="radio" id="sex" value="male">male<br/>
<input type="radio" id="sex" value="female">female
</td>
<tr>
<td>
mobile no.
</td>
<td>
<input type="text" id="mobname" />
</td>
</tr>
<tr>
<td>
password
</td>
<td>
<input type="password" id="pass1" />
</td>
</tr>
<tr>
<td>
confirm password
</td>
<td>
<input type="password" id="pass2" />
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="SIGNUP" id="submit" name="submit" />
</td>
</tr>
</table>
</form>
<br/>
<pre>
<a href="loginform.php"> <b>login here </b> </a>
</body>
</html>

