I'm using below code to get data from PHP form. Its working fine.
<?php
$email=$_POST['email'];
$name=$_POST['name'];
$designation=$_POST['designation'];
$company=$_POST['company'];
$phone=$_POST['phone'];
$data=$name.",".$email.",".$designation.",".$company.",".$phone;
$file="file.csv";
file_put_contents($file, $data . PHP_EOL, FILE_APPEND);
?>
Whenever any user puts information in the form with separated (.) then name and email come in different cells in .csv file.
How it will solved?
Thanks!
</div>