razeena
(Razeenaka Dm)
1
Hi,
Please see the sceanrio.
==========
if(condition)
{
$var = "option1";
}
else
{ $var ="option2";
echo $_POST[$var];
===================
The above code throws error.
what needed was $_POST[‘option1’];
Any idea how to place a variable inside post?
vikrant
(Vikrant Takkar)
2
You can’t do that.
there is no way to assign var into POST, and there is no need to do that
if(condition)
{
$var = "option1";
}
else
{ $var ="option2";
echo $var;
}
please specify your requirement to "place a variable inside post"