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?
 
Mohamed AbowardaConnect With a Mentor Software 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
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.