do you have any suggestions with my problem. I need to use $_GET and $_POST at the same time. $_GET because I need to get the row which the user want to save I commit the row through the url. $_POST because I need to write the changed input into a csv file. It looks like this:
$fileName = '../anfragen.csv';
$lineNum = $_GET['row'];
$arr = file($fileName);
$lineToEdit = $lineNum;
if($_GET['speichern'] != NULL ) {
$handle = fopen ("../anfragen.csv", "w");
$arr[$lineToEdit] = utf8_decode($_POST['email']) . ";" . $_POST['gender'] . ";" . "\n");
// write the array in the csv file
foreach($arr as $line) {
fwrite($handle,$line);
}
}