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

INSERT data problem!
After having an string with apostrophes ', double quotes " or any other special characters, suc

Oracle Connectivity
Hi Every One,

Can we access SAP from oracle database.If it possible then please spec

My query is being run with no results.
I have this.

Code: function DropUser($duser_id, $user_email, $user_username) {

Variable passed to each() is not an array or object
Hi,

This is a email a friend type of form, and it isn't working anymore.

<?

TinyMCE / Ajax Postback Problem
Hiya all,

I have a page which loads the TinyMCE editor. On the postback I obviously want to f

Multiple server callbacks (NOT POSTBACKS)
Hello, I have 2 different javascript client side functions that are on timers. When the timers elap

Multi image upload
I have a gallery to build and want to build a dynamic upload form to allow for $var number of fields

present value of sequence?
Hi

Please help me to find out the present value of sequence?

Thanks

explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searc

Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba

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