Skip to content
Snippets Groups Projects
Commit 5df40bad authored by Martina Maggio's avatar Martina Maggio
Browse files

restarting

parent 9b9ab700
Branches
No related tags found
No related merge requests found
<?php <?php
$name = $_POST['name'];
$surname = $_POST['surname'];
$email = $_POST['email'];
$newcomer = 'No';
$dietary = $_POST['dietary'];
if (isset($_POST['newcomer'])) { $newcomer = 'Yes'; }
$files = glob('/home/WWW/public/ECRTS2015/data/*'); // get all file names $not_processable = (empty($name) || empty($surname) || empty ($email));
foreach($files as $file){ // iterate files
if(is_file($file))
unlink($file); // delete file
}
// $name = $_POST['name'];
// $surname = $_POST['surname'];
// $email = $_POST['email'];
// $newcomer = 'No';
// $dietary = $_POST['dietary'];
// if (isset($_POST['newcomer'])) { $newcomer = 'Yes'; }
// $not_processable = (empty($name) || empty($surname) || empty ($email)); if ($not_processable) {
die('First Name, Last Name and E-mail are required, please
// if ($not_processable) { <a href="http://control.lth.se/ecrts2015/registration.html">try again</a>.');
// die('First Name, Last Name and E-mail are required, please }
// <a href="http://control.lth.se/ecrts2015/registration.html">try again</a>.'); else {
// } $filename = '/home/WWW/public/ECRTS2015/data/' . $surname . '-' . $name . '.txt';
// else { $data = '--------------------------------------------------------------------------------' . "\n" .
// $filename = '/home/WWW/public/ECRTS2015/data/' . $surname . '-' . $name . '.txt'; 'First Name: ' . $name . "\n" .
// $data = '--------------------------------------------------------------------------------' . "\n" . 'Last Name: ' . $surname . "\n" .
// 'First Name: ' . $name . "\n" . 'E-mail: ' . $email . "\n" .
// 'Last Name: ' . $surname . "\n" . 'IP: ' . $_SERVER[REMOTE_ADDR] . "\n" .
// 'E-mail: ' . $email . "\n" . 'Date: ' . date('Y-m-d H:i:s') . "\n" .
// 'IP: ' . $_SERVER[REMOTE_ADDR] . "\n" . 'Dietary: ' . $dietary . "\n" .
// 'Date: ' . date('Y-m-d H:i:s') . "\n" . 'First ECRTS: ' . $newcomer . "\n" .
// 'Dietary: ' . $dietary . "\n" . '--------------------------------------------------------------------------------' . "\n";
// 'First ECRTS: ' . $newcomer . "\n" . $ret = file_put_contents($filename, $data, FILE_APPEND | LOCK_EX);
// '--------------------------------------------------------------------------------' . "\n"; if ($ret === false) {
// $ret = file_put_contents($filename, $data, FILE_APPEND | LOCK_EX); die('An error occurred, please
// if ($ret === false) { <a href="http://control.lth.se/ecrts2015/registration.html">try again later</a>.');
// die('An error occurred, please }
// <a href="http://control.lth.se/ecrts2015/registration.html">try again later</a>.'); else {
// } header("Location: http://www.euromicro.org/registration/registration.php?event=RTS2015");
// else { exit;
// header("Location: http://www.euromicro.org/registration/registration.php?event=RTS2015"); }
// exit; }
// }
// }
?> ?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment