xyn Posted December 6, 2006 Share Posted December 6, 2006 Hey,I get this error:Parse error: syntax error, unexpected ']', expecting '(' in /file_name.php on line 626This line is:[color=red]elseif(isset( $_POST['empty'] ))[/color]My code is:[code=php:0]<?function pmaction(){if(isset( $_POST[delete] )){ if(empty($_POST[del])) { echo ("<p class=\"text\"><span class=\"error\">Error:</span><br>Please select your message(s) which you want to delete.</p>"); return false; } $list = join(',' , $_POST[del]); mysql_query("UPDATE pm SET stats='deleted' WHERE id IN ($list)"); header("location: ./index.php?dir=member&page=".MakeSafe($_POST[dir])."");}elseif(isset( $_POST['empty'] )){ mysql_query("UPDATE pm SET stats='deleted' WHERE user_to='{$_SESSION[username]}' AND folder='".MakeSafe($_POST[dir])."' AND report='0'"); header("location: ./index.php?dir=member&page=".MakeSafe($_POST[dir])."");}elseif(isset( $_POST[markold] )){ if(empty($_POST[del])) { echo ("<p class=\"text\"><span class=\"error\">Error:</span><br>Please select your message(s) which you would like to mark as seen.</p>"); return false; } $list = join(',' , $_POST[del]); mysql_query("UPDATE pm SET stats='seen' WHERE id IN ($list)"); header("location: ./index.php?dir=member&page=".MakeSafe($_POST[dir])."");}elseif(isset( $_POST[marknew] )){ if(empty($_POST[del])) { echo ("<p class=\"text\"><span class=\"error\">Error:</span><br>Please select your message(s) which you would like to mark as not seen.</p>"); return false; } $list = join(',' , $_POST[del]); mysql_query("UPDATE pm SET stats='unseen' WHERE id IN ($list)"); header("location: ./index.php?dir=member&page=".MakeSafe($_POST[dir])."");}elseif(isset( $_POST[move] )){ if(!isset( $_POST[movedir] )) { echo ('page_down'); //include("./member/move_file.php"); } else { if(empty( $_POST['list'] )) { echo ("<p class=\"text\"><span class=\"error\">Error:</span><br>Please select your message(s) which you would like to move to another folder.</p>"); return false; } $list = join(',' , $_POST[del]); mysql_query("UPDATE pm SET folder='".MakeSafe($_POST[folder])."' WHERE id IN ($list)"); header("location: ./index.php?dir=member&page=".MakeSafe($_POST[dir]).""); }}return true;}?>[/code] Quote Link to comment Share on other sites More sharing options...
marcus Posted December 6, 2006 Share Posted December 6, 2006 try[code]else if(isset($_POST[empty])){[/code] Quote Link to comment Share on other sites More sharing options...
xyn Posted December 6, 2006 Author Share Posted December 6, 2006 worked, thx :S Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted December 6, 2006 Share Posted December 6, 2006 Please edit your post and surround you code with the [b][nobbc][code][/code][/nobbc][/b] tags.Actually, all indices in an array reference should be quoted, not the reverse.Ken Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.