0

I am getting parse error for the following code block

<? if(!empty($_SESSION['sess_sdrf_msg'])) { ?>
   <div class="col-md-12 text-center bottom-buffer"><span <? if($_SESSION['errorflag'] == "1"){?>class="error_msg"<?php }else{?>class="success_msg"<?php }?> style="text-align: center;"><?php echo $_SESSION['sess_sdrf_msg']; unset($_SESSION['errorflag']);unset($_SESSION['sess_sdrf_msg']);?></span>
</div>   
<?php }?>
Brian61354270
  • 8,690
  • 4
  • 21
  • 43
  • 1
    Go through your whole file and see if you have an equal number of `{` and `}`. You might have missed an opening `{` somewhere in the file (the actual error could be anywhere.) I would also recommend to exclusively use ` – M. Eriksson Dec 03 '20 at 18:57
  • You don't have to put all your code on one line. It's compiled on the server and cached. You don't need to minimize it like java script. It's not going to lower the computing load. – Jason K Dec 03 '20 at 19:07

0 Answers0