I have a form element that gets user details and a php script that writes these inputs to a .txt file. What Im having trouble with is following the completion of the php script the url redirects to the http://. . ./the.php and displays a blank page- Im very new to server side scripts but what Im attempting to do is to allow the user to input data and store that data in a text file this text file should me made up of several different inputs collected on multiple days
<?php
if(isset($_POST['aDate'])) {
$aDate = $_POST['aDate'];
$fp = fopen("details.txt", "a");
fputs($fp, "date: $aDate");
fclose($fp);
?>
<form action="txtWrite.php" method="POST" onSubmit="detail()">
<input id="datepicker" name='aDate' type="text" class="time"/>
. . .
I have tested the input values by adding an echo($aDate) in the php script and it checks out, so how do I then redirect back to the html page that allows for more user input to be added to the text file? If you can understand what Im trying to accomplish and have an alternative route, Im all ears. Thanks for taking the time to help me out.