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

Save file by click
Hello.
I'm not understand how to save file from page. I'd like make link to file with save abil

add text and number image
hi guys ..

ok see i want the user to add their name and pick a number then click get it and i

Oracle11g Patch issue
Hi all,

I'm getting the following error while installing Oracle11g Patch 11.1.0.7.0 on IBM-AI

mail() problem
Hi Guys,

I've set up a contact email form. It sends the information fine, but it sends it to

Using insert variable
need a way to inert variable data to mysql database

$acc = "212121212";
$nok =

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

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

please hep to get values from a table row
can anyone tel me how I can select and get data from one row by pressing an Edit button in that row

Appending GET data with form submition
Okay, what I'm trying to do is to use a form to append an already existing GET data string.

I

Display last record first.
I need some help how put the last record first and first record last.

Thanks

Code: &am

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