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

DBCA Templates
Hi all,

I'm working on creating a template for DBCA, but can't find any documentation on the

timezone change with date()
so i put all my times for posts in my made from scratch forum(not phpbb3 or sm)
in my mysql db u

Creating web pages by php
Hello again,
I was just wondering us there a way to use a php script to create a new web page. I

PHP FTP connect doesn't work with correct login
Hi!

i am working on this test code:
Quote<?php

$ftp_ser

multiple recipients + dbuser mail recall
Hello,

I am building a php login script.

When the user registers the script will send

Operator precedence assistance.
I did a quick Google search and couldn't quite find the answer I wanted in terms I could understand,

SAP Project Module
I have seen in the SAP Project Module,plan cost and budget are not equal and even difference is sign

Undefined index on my form
ok im getting Undefined index on this line.. print_r($_REQUEST['form']);

below is the full sc

Agency Business Process
Hi,

I don’t understand the process of the agency business in SAP.

In my

Production of mango in processing industry
Hi,

We have one scenario ,company is in process industry,they are manufacturing MANGO pul

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