It doesn't work because you're creating a new file db.htm make 1 & 2 every time an user visits your site.
You use file_put_contents wrong, try it this way.
http://www.php.net/manual/en/function.fi...ntents.php
edit: for a new line use \n inside of double qoutes.
You use file_put_contents wrong, try it this way.
PHP Code:
file_put_contents('Database.html', implode('', array_unique(array_merge($data1,$data2))), FILE_APPEND);
edit: for a new line use \n inside of double qoutes.