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
{
Did you know?Explore Trending and Topic pages for more stories like this.

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

Adding post count
How would I make it so everytime someone clicks submit on my form, their row in the database for the

split values
I have values that are returned to me in this format:

name=>test,age=>49

Two warning messages
Quote<b>Warning</b>: mysql_real_escape_string() expects parameter 1 to

PHP using IF to display error
i have a MySQL query and i want to display 1 thing only if the number of affected rows is >=1

Help me with some material on Open Text Overview.
Hi Experts,
Please help me out with some material on Open Text. I have been supporting AP Workf

Data storage spaces in varchar2
Trying to understand what's happening.
I am selecting a value from a table that is defined as c

Shuffle between users ??
I have multiple $users in table. I need to send them $message.

I need to send the next messag

Table sorting
Hi,

I'm trying to modify the following in order to make the output table sorted alphabeticall

Multiple submit forms inside a mysql array page
Hi all,

Im having trouble to get the beneath script to work the thing i can't seem to get wor

Refining of search Criteria
Dear Friends

I need a help, I have a search page which of cars related, which has different s

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