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

difference between datetimes
($row['totime']-$row['fromtime'])/60

this is giving me 0

example of totime and fromtim

OOP help
okay so i have a class im making it has everything setup i just need to randomize the 2 variables an

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

How to give the privillege for triggers?
Hi,

How to give the privillage for triggers to particular user?

Please let me

please help
HTML Code:

Code: <span id="ctl00"><span>

how to query data from website using VC?
I want to query some datum from a website,so I need a program to read data from a .csv file, and ass

Need a fuction to count entries in a field
Hi
I need a fuction to count how many times a email address is entered in to a field.

I ma

Confusing Functions
So, I've been reading up on Functions and I like them! However, I need some help using variables in

Install page
How do I make it so when a user submits information on the Install page, it'll right it into the cor

i have no idea why this isn't working
Code: <?php
session_start();
include("connect.php");

error_reporting(E

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