So I have a PHP page (labeled page_2
) that is being passed data from a POST request from a form from another page (page_1
) (let's label them form_1
and form_2
. Let's say form_1
hold the data data_1
and form_2
holding data_2
.
As for the script, I'm attempting to insert the data from both form_1
and form_2
into a variable defined via page_2
.
So far I have the following:
<?php
$var = "alpha=$_POST['form_2']&beta=$_POST['form_2']"
echo $var
?>
The expected output is:
alpha=data_1&beta=data_2
However, I get no output. Any ideas?