Complete add flight

JS, html
Use PHP filters to prevent some security issues