Sorry for this crazy question but it seems to be odd!
I have a code:
if(isset($_GET['tablename'])){
$tablename=$_GET['tablename'];
var_dump($tablename);
echo 'Table is set <br/>';
if($tablename="product"){
echo 'Table is product <br/>';
};
if($tablename="demanded"){
echo 'Table is demanded <br/>';
};
};
and this is what I see on display:
string ‘demanded’ (length=8)
Table is set
Table is product
Table is demanded
please help
I want to run sub queries depending on table value (product or demanded)
You should use
==to make the comparison, not a single=