Hi,
I have created table in database mysql and I created register form and I wrote insert code ,when we run the php file there is no but given data is not inserted in database....I need help,I am new to php....
This is my code i have used,........
<?php
if(isset($_POST)){
$host= "localhost";
$username= "root";
$password= "";
$db_name= "register";
$tbl_name="form";
mysql_connect("$host","$username","$password") ;
mysql_select_db("$register") ;
$fname= $_POST;
$lname =$_POST;
$eid =$_POST;
$pwd=$_POST;
$cpwd=$_POST;
$sql="INSERT INTO $form (id , fname ,lname, eid , pwd,cpwd) VALUES('NULL',' $fname','$lname','$eid','$pwd','$cpwd')";
$result=mysql_query($sql);
// close connection
mysql_close();
}
?>