I want to run this code :
if ($_GET['CHOOSE'] == 1)
{
$field = " 'col1' ";
}
else
{
$field = " 'col2 ' ";
}
echo mysql_result($result,0,$field);
unfortunately I got false ??
I want to run this code :
if ($_GET['CHOOSE'] == 1)
{
$field = " 'col1' ";
}
else
{
$field = " 'col2 ' ";
}
echo mysql_result($result,0,$field);
unfortunately I got false ??
Try this
if ($_GET['CHOOSE'] == 1)
{
$field = "col1";
}
else
{
$field = "col2";
}
echo mysql_result($result,0,$field);