<form method="POST" action="">
<input type="text" name="usernm">
<input type="text" name="passwd">
<input type="submit" value="submit">
</form>
<?
if(@$_POST)
{
//database connection & query for contractor_form table
$username="aaa";
$password="dfr";
$database="bvd";
$datahost="localhost";
$con=mysql_connect($dhost,$username,$password);
$db=mysql_select_db($database);
if (!$con)
{
die("unable to connect". mysql_error());
}
if (!$db)
{
ide('unable to select the database'.mysql_error());
}
$query="insert into user(username,password) values('$_POST('$usernm')','$_POST('$passwd')'";
$result=mysql_query($query);
if (!$result)
echo('unable to get the ersult') . mysql_error();
}
?>
whne xecuting its showing unable to get result error in line 1.
can anyone help me pls???