Hello, im trying to get information out of my database, and creating a page numbering so if there is more then X results but im getting “Parse error: syntax error, unexpected T_STRING in /folder/index.php on line 97” can someone please help me to find out why this aint working ? :/
[code=php]<?
require_once(“config.php”);
?>
<?php
//This checks to see if there is a page number. If not, it will set it to page 1
if (!(isset($pagenum)))
{
$pagenum = 1;
}
if($rows==0)
{
echo “<center>nothing was found</center>”;
}else{
//This tells us the page number of our last page
$last = ceil($rows/$page_rows);
?>
//this makes sure the page number isn’t below one, or more than our maximum pages
if ($pagenum < 1)
{
$pagenum = 1;
}
elseif ($pagenum > $last)
{
$pagenum = $last;
}
// This shows the user what page they are on, and the total number of pages
$max = $page_rows * ($pagenum – 1);
//this makes sure the page number isn’t below one, or more than our maximum pages
if ($pagenum < 1)
{
$pagenum = 1;
}
echo ” –Page $pagenum of $last– <p>”;
if ($pagenum == 1)
{
}
else
{
echo “<a href='{$_SERVER[‘PHP_SELF’]}?pagenum=1}’><<-First”;
echo ” “;
$previous = $pagenum-1;
echo “<a href='{$_SERVER[‘PHP_SELF’]}?pagenum=$previous}’><- Previous”;
}
//just a spacer
echo ” — “;
if ($pagenum == $last)
{
}
else {
$next = $pagenum+1;
echo “<a href='{$_SERVER[‘PHP_SELF’]}?pagenum=$next}’>Next -></a>”;
echo ” “;
echo “<a href='{$_SERVER[‘PHP_SELF’]}?pagenum=$last}’>Last ->></a>”;
}
?>
<br>
<br>
<!– BEGIN show_site_ads –>
<!– END show_site_ads –>
<br>
<?
$max = ‘limit ‘ .($pagenum – 1) * $page_rows .’,’ .$page_rows;
//echo $max;
$result = (SELECT * FROM flash order by DATE”);
$count = mysql_result($result, 0);
$page = 1;
$limit = 30;
if(isset($_GET[‘page’]) && $_GET[‘page’] >= 1 && $_GET[‘page’] <= ($count / $limit)) {
$page = (int)$_GET[‘page’];
}
$offset = $limit * ($page – 1);
$query = “SELECT * FROM flash order by DATE”;
$result = mysql_query($query);
if(!$result) {
echo “Error with query”;
exit;
}
$temp = array();
$i=0;
while($row = mysql_fetch_array($result)) {
$temp[$i][0]=$row[‘name’];
$i++;
}
$z=0;
echo “<table border=’0′ cellpadding=’5′>”;
for($x=0;$x<ceil($i/5);$x++)
{
echo “<tr>”;
for($y=0;$y<$image_per_row;$y++){
echo “<td>”;
if(empty($temp[$z][0]))
{
echo “ ”;
}
else{
echo ‘<center><a href=”/<? echo $temp[$z][0] target=”_blank”; ?>”><? echo $temp[$z][0]; ?></a>
<br></center>’;
}
echo “</td>”;
$z++;
}
echo “</tr>”;
}
echo “</table>”;
}
echo “<title>Title</title>”;
?>
<!– BEGIN show_site_ads –>
<!– END show_site_ads –>
<div style=”clear:both”>
</div>
<?
include “footer2.php”;
?>