first commit
This commit is contained in:
23
app/save.php
Normal file
23
app/save.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
|
||||
$number = $_POST['number'];
|
||||
|
||||
if (empty($number)) {
|
||||
echo "Invalid input";
|
||||
exit;
|
||||
}
|
||||
|
||||
$file = 'data.csv';
|
||||
|
||||
$handle = fopen($file, 'a');
|
||||
|
||||
// Save ONLY number (no timestamp)
|
||||
fputcsv($handle, [$number]);
|
||||
|
||||
fclose($handle);
|
||||
|
||||
echo "Saved!";
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user