JS add new Flow to list and using php to put flow to DB