PHP Parse Error unexpected {, expecting ( - don't understand why -


i know might dumb question not able make work. trying webservice php. php parse error can't figure out why.

parse error: syntax error, unexpected '{', expecting '(' in /www/htdocs/flight/webserv/shiftswop_register_group.php on line 25 

and here part of code of class:

<?php   include 'shiftswop_constants.php'; include 'shiftswop_db_connect.php';    class shiftswitchregistergroupapi {  private $db;  //constructor function __construct() {     $this -> db = new mysqli(host, user, password, database);     $this -> db -> autocommit(false); }  //decstructor  function __destruct(){     $this -> db -> close(); }  function create {      <======== line 25      if(isset($_post[key_group_name]) && isset($_post[key_group_password]) && isset($_post[key_user_id]) && isset($_post[key_user_password])){          $groupname = $_post[key_group_name];         $grouppassword = $_post[key_group_password];         $userid = $_post[key_user_id];         $userpassword = $_post[key_user_password];            $groupname = str_replace(" ", "_", $groupname); 

this whats in connect.php file:

<?php  define("host", "www.*****.de"); define("user", "f****r"); define("password", "*****"); define("database", "f********er"); ?> 

and contstants file:

<?php define("key_user_id", "userid"); define("key_user_first_name", "userfirstname"); define("key_user_last_name", "userlastname"); define("key_user_initials", "userinitials"); define("key_user_email_address", "useremailaddress"); define("key_user_telefon_number", "usertelefonnumber"); define("key_user_password", "userpassword"); define("key_user_last_successful_sync", "userlastsuccessfulsync");   define("key_group_id", "groupid"); define("key_group_name", "groupname"); define("key_group_password", "grouppassword");  ?> 

and on.... not understand why expecting "("

can please have look?

thanks help!

hope works. need change:

function create {    

to

function create() {    

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -