-3

i have syntax error in line 213 please need some help

E.haddad
  • 3
  • 1
  • 1
    Possible duplicate of [PHP Parse/Syntax Errors; and How to solve them?](http://stackoverflow.com/questions/18050071/php-parse-syntax-errors-and-how-to-solve-them) – Charlotte Dunois May 16 '16 at 19:55
  • Look at the line before it. Is that how you end an echo statement? It's not how anyone else ends an echo statement. – kainaw May 16 '16 at 19:55
  • 1
    Welcome to StackOverflow! Please read [How do I ask a good question?](http://stackoverflow.com/help/how-to-ask) – Pedro Lobito May 16 '16 at 19:58
  • 1
    Link only questions (and answers) are likely to be down voted. Please post code directly (with proper formatting). – BM5k May 16 '16 at 20:00

1 Answers1

0

The referenced code contains a number of issues (an undefined variable $no on line 218, and what looks like a mysql query being run within an echo to name a few...), however, without elaborating on the particulars of each issue, I would suggest the following to simplify your code and make it easier to debug: First build your output within a variable and then echo it to the browser after executing both queries, like so (edit begins on line 203 of your code):

    $output = '';

    while($row=mysql_fetch_array($guest))
    {
       $output.= '<tr>';
       $output.= '<td align=\"center\">'.$row["ID_guest"].'</td>';
       $output.= '<td align=\"center\">'.$row["First_name"].' '.$row["Last_name"].'</td>';
       $output.= '<td align=\"center\">'.$row["Check_In_Date"].'</td>';
       $output.= '<td>'.$row["Check_Out_Date"].'</td>';
       $output.= '<td>'.$row["Request_Date"].'</td>';
       $output.= '<td align=\"center\">'.$row["No_Of_Room"].'</td>';
       $output.= '<td align=\"center\">'.$row["Category_Name"].'</td>';
       $output.= '<td align=\"center\"><select>';

       $roomsql = "SELECT...";
       $roomresult = mysql_query($roomsql);
       while($rooms=mysql_fetch_array($roomresult))
       {
          $output.= '<option>'.$rooms['Room_No'].'</option>';
       }

       $output.= '</select></td>';
       $output.= '</tr>';
    }

    echo($output);
IzzEps
  • 582
  • 6
  • 20