hi ,i am new to php i have problem with my code . problem is when ever a page is loded
<?php
if(isset($_POST['submit']));
{
$conn=mysql_connect("localhost","root","vamshi");
if(!$conn)
{
die("couldn't Connected : " .mysql_error());
}
mysql_select_db("ninepixel",$conn);
$sql="insert into empattendence (name,daydate,choice) values('$_POST[name]',now(),'$_POST[choice]')";
if(mysql_query($sql,$conn))
{
echo("Your Data Has been Submitted");
}
else{
echo("Please Enter All the Fields");
}
mysql_close($conn);
}
?>
or refreshing it inserting a blank row in table,i want to insert data after filled the fields and click the button it has to insert pls help me