$_POST with a variable?
Posted: Sat Apr 09, 2005 11:15 am
Is it possible to get a value from a $_POST retrieval if the name is a variable?
See code below
This is coming from a form that buids the input names in the same way:
See code below
Code: Select all
$n=0;
while ($n < $number2){
$Currency = mysql_result($result2, $n, "currencyname");
$array = array($Name, $Currency);
$Account= implode("-", $array);
$accountval=$_POST["'$Account'"];
echo $Account ."=". $accountval . "<BR>";
$n++;
}Code: Select all
$n=0;
while ($n < $number2){
$Currency = mysql_result($result2, $n, "currencyname");
$array = array($chName, $Currency);
$Account= implode("-", $array);
$Accountname = "'$Account'";
echo "<TD><INPUT name='".$Accountname."' type='text' size='8'></TD>";
$n++;
}