Sunday, 1 May 2016

php - Parse error: syntax error, unexpected '{', expecting '(' help?




I'm trying to make a photo gallery plugin for express engine, yet it's giving me this error and everything seems to close. Any help?



$whats_gonna_happen=$_GET['pictures'];

class upload_pictures
{
public function upload_pictures
{
if (!isset($whats_gonna_happen))

{
$uploads='';
$cout=1;
$stuff=$this->EE->db->query('SELECT id, name FROM albums');
$albums_list='';
while ($row=$stuff->result_array())
{
$albums_list .= "\n";
}
mysql_free_result($stuff);

echo '

Pictures upload









Choose album :



photo :


Caption :







';
}


Answer



The problem is here:



public function upload_pictures


should be:



public function upload_pictures()


No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...