Echoing a Variable from a Object


Posted on 16th Feb 2014 07:03 pm by admin

How do I get a variable from the new User Class to echo out in this clasS?

class MyApp
{

function __construct()
{
global $dbHost;
global $dbUser;
global $dbPass;
global $dbName;

$this->DB = new Database;
$this->DB->connect($dbHost, $dbUser, $dbPass, $dbName);

$User = new User;

echo $User->login;
echo $this->User->login;

}


}

No comments posted yet

Your Answer:

Login to answer
271 Like 8 Dislike
Previous forums Next forums
Other forums

Printing issues with xMII 11.5
For some reason, we have one report (and only one) that is giving us fits when trying to print. The

Production Order Enterprise Service to Manufacturing Exctn Sys (MES) ???
Hello Experts,

In our current landscape SAP ECC 5.0 is integrated to MES system via PI 7.

Extracting Long text from message class with parameters
Hi,

I would like to extract the long text from a message class. However, the long text ha

Batch Related Pricing
Hi, I need some clarity on the batch related pricing

For example the following are the b

Stats of viewers
Hello. I have a website in php and people can login. I want to make an admin control panel where u c

Java API in PHP?
I have an application that we use internally here at the office.

The software company provide

MII Netweaver Server stopped due to CPIC connection Problem
Dear Experts,
We have SAP XMII 12.0 setup running on Netweaver 2004s,7.0, Java Stack only.

form submit at godaddy?
Trying to test form submission at GoDaddy and it does not seem to work. Here's the page...

h

Place specific image in html page when specific name is typed.
Hello,

Fairly new to PHP and was curious if someone might know how to solve a fairly simple r

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash