PHP Parse Error

I keep getting this error message and I need to know if it is just a simple syntax issue or one of my param is wrong.  How can i tell which param is causing the problem if it is not the syntax, Thank You.

MY CODE - THIS IS LINE 193:
function getAvailTransfers(){
    $DATA = new data(MYSQL_SERVER, MYSQL_CATALOG, MYSQL_USERNAME,MYSQL_PASSWORD);
    return $DATA::getAvailTransfers($_SESSION['USER_NAME']);

MY ERROR:
<b>Parse error</b>:  syntax error, unexpected T_PAAM_B in <b>/home/mysite/public_html/data/index.php</b> on line <b>193</b><br />

Thank You
GarySBAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lukasz ChmielewskiCommented:
function getAvailTransfers(){
    $DATA = new data(MYSQL_SERVER, MYSQL_CATALOG, MYSQL_USERNAME,MYSQL_PASSWORD);
    return $DATA::getAvailTransfers($_SESSION['USER_NAME']);

seems a little strange - creating an object of class data and then calling the function that created it ? Is that ok ?
0
Mohamed AbowardaSoftware EngineerCommented:
Change the line:
 
return $DATA::getAvailTransfers($_SESSION['USER_NAME']);

Open in new window


To:
 
return $DATA->getAvailTransfers($_SESSION['USER_NAME']);

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GarySBAuthor Commented:
I will try it this evening, Thank You
0
GarySBAuthor Commented:
Changing :: to -> took care of the error.

Question before I give you the 500 points.
I am now getting 6 Warnings supplied argument is not a valid MySQL-Link resource in...

Do you want me to post this as a new question or set it up as a bonus and list the lines here?
Thank You
0
Mohamed AbowardaSoftware EngineerCommented:
@GarySB: The question is completely different than this one, close this question and ask related question.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.