Note that there are some explanatory texts on larger screens.

plurals
  1. POUnexpected $end: I Know exactly where the culprit is, but don't know how to fix it
    primarykey
    data
    text
    <p>I get this error message:</p> <blockquote> <p>"Parse error: syntax error, unexpected $end in C:\Users\Stacky\Desktop\xampp\htdocs\wweff\stackhelp.php on line 822"</p> </blockquote> <p>I've been trying to get this code working by tinkering with only one line of my code, line 54.</p> <p>Here's the full code. Look out for "//^^^^ RIGHT ABOVE IS LINE 54." in the code below:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;?php $objConnect = mysql_connect("localhost","root","") or die(mysql_error()); $objDB = mysql_select_db("thegoodhumor"); $strSQL = "SELECT * FROM gallery"; if (!isset($_GET['Page'])) $_GET['Page']='0'; $objQuery = mysql_query($strSQL); $Num_Rows = mysql_num_rows($objQuery); $Per_Page = 16; // Per Page $Page = $_GET["Page"]; if(!$_GET["Page"]) { $Page=1; } $Prev_Page = $Page-1; $Next_Page = $Page+1; $Page_Start = (($Per_Page*$Page)-$Per_Page); if($Num_Rows&lt;=$Per_Page) { $Num_Pages =1; } else if(($Num_Rows % $Per_Page)==0) { $Num_Pages =($Num_Rows/$Per_Page) ; } else { $Num_Pages =($Num_Rows/$Per_Page)+1; $Num_Pages = (int)$Num_Pages; } $strSQL .=" order by GalleryID ASC LIMIT $Page_Start , $Per_Page"; $objQuery = mysql_query($strSQL); $cell = 0; echo '&lt;table border="1" cellpadding="2" cellspacing="1"&gt;&lt;tr&gt;'; while($objResult = mysql_fetch_array($objQuery)) { if($cell % 4 == 0) { echo '&lt;/tr&gt;&lt;tr&gt;'; } if($cell == 2 || $cell == 3) { echo '&lt;td&gt;RESERVED&lt;/td&gt;'; } else { echo '&lt;td&gt;&lt;img src="https://s3.amazonaws.com/imagetitle/' . $objResult["Picture"];?&gt;" height="190" width="190" /&gt; . .$objResult["GalleryName"].'\&lt;/td&gt;'; //^^^^ RIGHT ABOVE IS LINE 54. } $cell++; } echo '&lt;/tr&gt;&lt;/table&gt;'; ?&gt; &lt;?php //DELETED PAGINATION CODE for the sake of simplicity in StackOverflow ?&gt; &lt;/body&gt; &lt;/html&gt; &lt;?php mysql_close($objConnect); ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload