I wanted to display a date and time on cars.txt when the user submit the form.
how can I do that? can someone teach me ? here is my html :
<form action="lol.php" method="get" >
<h1> select cars</h1>
<select>
<option value=honda> honda civic </option>
<option value=toyota> toyota </option>
<option value=mitshubishi > mitshubishi </option>
</select>
</form>
here is my lol.php
<?php
header("Location: thanksforsubmit.html");
$handle = fopen("cars.txt", "a");
foreach($_GET as $variable => $value) {
fwrite($handle, $variable);
fwrite($handle, "=");
fwrite($handle, $value);
fwrite($handle, "
");
}
fwrite($handle, "
");
fclose($handle);
exit;
?>