Saving value as a variable name in database

sklsik

New Member
Database Table company_info\[code\]-----------------------------| companyname | companytype |-----------------------------| Company One | Blah |-----------------------------| Company Two | Blah2 |-----------------------------\[/code\]Database Table invoice_template\[code\]-----------------------------| Header | bgcolor |-----------------------------| $company | Red |-----------------------------| $company | Biege |-----------------------------\[/code\]PHP file common_include.php\[code\]$company = ... //FROM db table company_info field companyname\[/code\]PHP file invoice.php\[code\]include('common_include.php');$header = ... //FROM db table invoice_template field headerecho "Header is ". $header;echo "<br/>Company is ". $company; //$company is defined in common_include.php\[/code\]OUTPUT of invoice.php when company logged in is for eg.Company One\[code\]Header is $companyCompany is Company One\[/code\]Question: How do I get the $company in the output to be shown as Company one? i.e How do I get the output from MySQL DB to be treated as a variable?
 
Back
Top