Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

object of type Session as array error

Status
Not open for further replies.

JASONE25

Technical User
Jun 23, 2005
54
NL
Hi all. I got a php script that i want install it on local apache webserver with php 5 . When i run it i get this error :

Code:
Fatal error: Cannot use object of type Session as array in line ..

It points to this line of code that is at very end of this cript

Code:
// Create Class
$mymusic = new Music($_GET['action'], $session['username']);


?>

could an expert help me fix this error.Thanks
 
Is that a typo and should your code read like this?
Code:
$mymusic = new Music($_GET['action'], $_SESSION['username']);
Bare in mind that variables in PHP are case sensitive.
 
varagabond many thanks to u . That solved the problem .The script itself typed it incorectly!!Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top