In php, how does one obtain the value corresponding to the variable name? & Lt ;? Php & nbsp; $ result = $ row ['result']; & nbsp; $ pid = $ row ['pid ']; & nbsp; & How does nbs obtain the value whose name is the corresponding variable in php?
$ Result = $ row ['result'];
$ Pid = $ row ['pid'];
If ($ result = 'conformances ')
{
Echo" ";
Echo" Does not match ";
Echo" Not involved ";
}
If ($ result = 'nonconformity ')
{
Echo" ";
Echo" Does not match ";
Echo" Not involved ";
}
If ($ result = 'not involved ')
{
Echo" ";
Echo" Does not match ";
Echo" Not involved ";
}
If ($ result = '')
{
Echo" ";
Echo" Does not match ";
Echo" Not involved ";
}
?>
How can I obtain the value of the value corresponding to the "name = '$ pid'" submitted by post on another page?
Another page $ a =$ _ POST ['$ pid']; it must be incorrect. how can this problem be obtained? This "name" must be replaced by a variable. Otherwise, the single-choice function may be faulty. please help me. thank you!
------ Solution --------------------
After the submission, print_r ($ _ POST); knows how to obtain it.
------ Solution --------------------
------ Solution --------------------
Reference:
After the submission, print_r ($ _ POST); knows how to obtain it.
+ 1
------ Solution --------------------
Reference:
PHP code? 1234
The name I mentioned cannot be the name of the result constant. the name should be replaced by a variable.