Hey Guys,
I have a php form which writes on a .csv file and works fine.
I want to add the following feature:
Every time somebody submits the form then the first column on the csv file will take an increasing number +1.
The process should be like this:
Click submit button => read on .csv the last line with text of first column => add +1 to this number and record it on the .csv => send email to the user with this value.
It will be sth like protocol number. I have limited knowledge on PHP.
The current write2csv and send email code is the following:
if($fp = fopen('file.csv', 'a'))
{
fputcsv($fp, $list, ';');
fclose($fp);
mail("$email",'=?UTF-8?B?'.base64_encode($subject_ep).'?='.'=?UTF-8?B?'.base64_encode($subject).'?=',"$replymessage","From: $replyemail1\r\nReply-To: $replyemail1\r\nContent-Type: text/plain; charset=utf-8\r\nContent-Transfer-Encoding: 8bit\r\n\r\n");
echo $success_sent_msg;
}else
{
echo "fail";
}
?>
Where $list is an array with all the variables.
Any assistance is appreciated.