I have a simple form that is not passing any data when I click the submit button.
Here is the code for the form.
<form method="post"
action="https://www.domain.com/play/<?php echo $playDirectory ?>/links">
<input type="hidden" name="playName" value="<?php echo $playName ?>">
<input type="submit" name="submit" value="submit">
</form>
The submit button successfully takes you to the correct landing page.
The landing page has the following code:
$playName=$_REQUEST['playName'];
However, the request statement picks up no data from the form.
When I echo $playName, it is empty.
Please note that I have checked the source data for the form
and the form DOES contain the data for $playName.
For some reason, however, the form
does not SEND the data when I click on “submit”.
I have tried adding a dummy field like
<input type="hidden" name="test" value="test data">
But the form will not send this data either.
No data is picked up on the landing page
when I use
$_REQUEST[‘test’];
The form is located two directories above the landing page –
tho’ I don’t know why that should make any difference.
The form “finds” the correct landing page.
It just does not send any data to it.
NOTE: I have tried placing the landing page
in the same directory as the form.
In that case, the form works.
For some reason, the data will not pass
when the landing page is in a different directory,
even though the form finds the page.
var_dump shows no data received on landing page
var_dump($_POST);