**i need help in my code !! **

<?php echo $prev.' '.$next;?>

**when open this page need make next and prev in link ? how can i do it ? I need my link Like It to show in body (Div ) !
how can i make it **

 <?=$prev.' '.$next;?> 

**Like It ? **

<a href="THIS_PAGE_URL?mid=<?php '.($prev).'?>">Prev</a>
<a href="THIS_PAGE_URL?mid=<?php '.($$next).'?>">Next</a>

**Original Code ? **

$res=mysql_query("select * from images where mid='".$mid."'",$conn);
$prevSQL = mysql_query("SELECT mid, path FROM images WHERE mid > '".$mid."' LIMIT 1");
$nextSQL = mysql_query("SELECT mid, path FROM images WHERE mid < '".$mid."' LIMIT 1");

$row = mysql_fetch_assoc($res);
    $prevRow = mysql_fetch_assoc($prevSQL);
    $prev = '<a href="admin/'.$prevRow['mid'].'">Prev</a>';
} else {
    $prev = 'Prev';
    $nextRow = mysql_fetch_assoc($nextSQL);
    $next = '<a href="admin/'.$prevRow['mid'].'">Prev</a>';
} else {
    $next = 'next';
<title><?php echo $row['image_title'] ?> | Afrogfx | Home</title>
<div class="gallery-img">
<a href="admin/<?php echo $row['path'] ?>" rel="prettyPhoto" class="portfolio-img" title="<?php echo $row['image_title'] ?>">
<img src="admin/<?php echo $row['path'] ?>" alt="<?php echo $row['image_title'] ?>" width="100%" height="100%" />

<?php echo $prev.' '.$next;?>

Recommended Answers

All 2 Replies

no way.... do it your self.. Just ask your problem.. here

Please try to explain the problem you are having, and what needs solving. Your post is a little unclear. If you explain, we're likely to help you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.