$self = $_SERVER['PHP_SELF'];
$id = $_POST['id'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
?>
if( $id and $fname and $lname){
$conn=@mysql_connect( "localhost", "userName", "password" ) or die( "Err:Conn" );
$rs = @mysql_select_db( "my_database", $conn) or die( "Err:Db" );
$sql = "insert into my_table ( id, first_name, last_name ) values ( $id, \"$fname\", \"$lname\" )";
$rs = mysql_query( $sql, $conn );
if( $rs ){
echo( "Record added:$id $fname $lname" );
}
}
?>