Parse error: syntax error, unexpected T_VARIABLE in /home/content/07/9656607/html/sales.php on line 44

this is the error I'm getting. I don't know why.
I put arrows on line 44

<?php
include("header.php");
global $db;
$artist_id = $_SESSION['user_id'];
                                    $sq_song="SELECT * FROM  `sales` WHERE  `user` =  '$artist_id' AND  `download` = 'Y'";
                                    $res_song=$db->select_data($sq_song);

?>
<div class="under_header">
            <img src="images/assets/breadcrumbs12.png" alt="#">
        </div><!-- under header -->
<div class="page-content back_to_up">
            <div class="row row-fluid forum clearfix mbf">
                <div class="span12 posts">
                    <div class="def-block clearfix">
                        <div class="mbf clearfix">
                            <span id="err1" class="lim_err"></span>
                            <form name="addsong" method="post">
<?php
                                            {
                                                $song_id = $res_song[$i]['song'];
                                                $artist=$res_song[$i]['artist'];
                                                $sale_date = $res_song[$i]['saleCreated'];
                                                $sales_dt=date('m/d/Y',strtotime($sale_date));

                                             $sel_song="select * from songs where songID='$song_id'";
                                             $res_sel_song=$db->select_data($sel_song);
                                             $song_title=$res_sel_song[0]['songTitle'];

                                             $sq_artist="select artist_grp_nm,email from register where id='$artist'";
                                             $res_artist=$db->select_data($sq_artist)
                                             $artist_nm=$res_artist[0]['artist_grp_nm']; // <-------------
                                             $email=$res_artist[0]['email'];
                                     ?>
                                <tr>
                                    <td><?php echo $song_title; ?></td>
                                    <td><?php echo $artist_nm; ?><br>
                                        <a style="color:purple;" href="mailto:<?php echo $email; ?>"><?php echo $email; ?>
                                        </a>

    The line number indicates where the parse error was detected. It does not necessarily mean that the mistake is on that line. In this case, the mistake is on the previous line:

    $res_artist=$db->select_data($sq_artist)

    Notice the lack of a terminating semi-colon.

      laserlight;11051403 wrote:

      The line number indicates where the parse error was detected. It does not necessarily mean that the mistake is on that line. In this case, the mistake is on the previous line:

      $res_artist=$db->select_data($sq_artist)

      Notice the lack of a terminating semi-colon.

      its saying there is error on line 373 unexpected '<' ...I put arrows rite before line 373

      </div>
      							</div>
      
      						<div id="sales">
      							<h4>Sales</h4><span class="liner"></span>
      								<div class="def-block widget">
      							<div class="widget-content">
      								<?php
      								$sq_song="SELECT * FROM  `sales` WHERE  `user` =  '$artist_id' AND  `download` = 'Y'";
      								$res_song=$db->select_data($sq_song);
      								if(count($res_song)==0);
      									 <strong style="color: #666;">You have not made any sales yet.</strong>; // <--------
      								<?php }
      								else{
      								?>
      									<table class="table_audio">
      										<tbody>
      											<thead style="border-bottom: 1px solid">
      												<th style="font-weight: bold;text-align: left">Song Title</th>
      												<th style="font-weight: bold;text-align: left">Artist Name</th>
      												<th style="font-weight: bold">Purchase Date</th>
      											</thead>
      
      											<?php
      								if(count($res_song)>0)
      									{
      										for($i=0;$i<count($res_song);$i++)
      										{
      								  			$song_id = $res_song[$i]['song'];
      											$artist=$res_song[$i]['artist'];
      											$sale_date = $res_song[$i]['saleCreated'];
      											$sales_dt=date('m/d/Y',strtotime($sale_date));
      

        Notice that you have HTML code within the PHP part of the file.

          IF statements typically don't end in a semicolon (perhaps never? I can't actually think of a use case), but rather a curly brace, which must be matched after the block to be executed:

          <?php
          
          if ($some_condition ) {
          
          some_action();
          
          }
          
          ?>

          If you're escaping from PHP to do plain HTML in the course of the block:

          <?php
          
          if ($some_other_condition) {
          ?>
          
          <span>This is my HTML stuff here</span>
          
          <?php
          } 
          ?>
            Write a Reply...