The following code receives strings from an HTML page and writes the strings to a text file. However in doing so it opens up a page in my browser with the address of the php file.
How can I stay with my html page and prevent this other page from showing.
<?php
$name = $_POST['txtFile'];
$tbx = $_POST['tbx'];
$chk = $_POST['chk'];
$txa = $_POST['txa'];
$file_handle = fopen($name, "w");
fwrite($file_handle, $tbx . $chk. $txa);
fclose($file_handle);
?>
The HTML form posting to this page is:
<form action="troncon.ca/Test/Test1.php"; method="POST" enctype="multipart/form-data" id="dataUpload">
<input type="hidden" name="txtFile" value="">
<input type="hidden" name="tbx" value="">
<input type="hidden" name="chk" value="">
<input type="hidden" name="txa" value="">
</form>