GET method returns 500 Internal server error.

GET method returns 500 Internal server error.

Hello.
I'm new here so I have some question.
So I'm developing a web page, but there ir some problem.
I have map with are tags, that onclick runs a function "getObject(this.alt)".
  1. function getObjects(object){
  2. console.log(object);
  3. $.get("/sites/map/objects.php?t="+object, function(data) {
  4.   $('#answer').html(data);
  5. });
  6.  
Ir runs file object.php were t= area tags alt attribute, the objects.php connects to MySql and returns objects row, but I get this kind of error:

  1. GET http://mysite.com/sites/map/objects.php?t=some_object 500 (Internal Server Error) jquery-latest.js:8706
Can you please help me? :)