I have a form (form.php) that is submitted to itself. All it has to do is assign the text from the textarea to a session variable, simple yes?
It doesn't work, the session variable always remains empty, in fact the (if (isset)) check returns false, when it clearly isn't, I can see the data in the get request URL. However if I use...
Code: Select all
echo $_GET['report'];This is driving me crazy, can someone please take a look. My code is below.
Code: Select all
<?php
session_start();
if (isset($_GET['report'])) {
$_SESSION['session_report'] = $_GET['report'];
//do some other stuff
}
?>
<html>
<form action = 'form.php' method = GET>
Please submit your report below<br />
<textarea name='report'></textarea><br />
<input type='submit' value = 'Submit' />
</form>
</html>