I have the following code that adds data from my form to an excel spreadsheet. However, when a new user fills out the form it overwrites the data on the first row, how would I make sure that new form submissions populate a new row in this file "datacollection.xlsx"
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$title = $_POST['title'];
$company = $_POST['company'];
$fp=fopen(".datacollection.xlsx","w");
fputcsv($fp, array($name, $email, $title, $company), ';');
fclose($fp);
?>
Help is appreciated!