Re: Parse error not understood

From: Date: Wed, 06 Aug 2003 12:46:05 +0000
Subject: Re: Parse error not understood
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-158456@lists.php.net to get a copy of this message
> //If "Delete User" is selected---------- > if ( $_REQUEST['useroption'] == 'delete') > { > //First, check that the user already exists > $query = "select count(*) from pbpc_client where username = '" . > $_REQUEST['usernamebox'] . "';"; > $result = mysql_query($query); > if(!$result) > { > echo 'Cannot run query.'; > exit(); > } > > $count = mysql_result($result, 0, 0); > if($count==0) > { > //User does not exist in the database > header('location: user_not_exists.php'); > exit(); > > header('location:del_new_user.php'); > exit(); > } > //header('location: content.php'); > ?> > > No matter which option I select I get the following output : > ------ > Parse error: parse error, unexpected $ in > /var/www/html/Sessions/userman.php on line 83 > > Line 83 is '?>'...... You missed a '}' at lines : if($count==0) { //User does not exist in the database header('location: user_not_exists.php'); exit(); Add a '}' after this, and your problem is fixed! -- Ivo Fokkema PHP & MySQL programmer Leiden University Medical Centre Netherlands

« previous php.general (#158456) next »