I wanted to create php paging with the base page is "Page 1" and the page links should start at "Page 2" leaving the "Page 1" link as an ordinary text not a link and when Im in "Second Page" the "Page 1" text becomes a link that leads to "First Page".
Like:
When on the base page. /orders.php
<div id="page-links">
<b>1</b>,
<a href="/orders.php?pagenum=2">2</a>,
<a href="/orders.php?pagenum=3">3</a>
</div>
When on the 2nd page. /orders.php?pagenum=2
<div id="page-links">
<a href="/orders.php?pagenum=1">1</a>,
<b>2</b>,
<a href="/orders.php?pagenum=3">3</a>
</div>
I have this php page:
<table>
<?php
$orders_check_raw = "select * from " . $orders . " where customers_id = '" . (int) $user_id . "'";
$orders_check_query = mysql_query( $wpdb->prepare( $orders_check_raw ) );
while ($orders_check = mysql_fetch_array( $orders_check_query )) {
$blog_details = get_blog_details( $orders_check['blog_id'] );
?>
<tr>
<th class="check-column"><input type="checkbox" name="order[]" value=""></th>
<td><?php echo str_pad( $orders_check['orders_id'], 7, '0', STR_PAD_LEFT ) . '<span style="display:none;">' . ltrim( str_pad( $orders_check['orders_id'], 7, '0', STR_PAD_LEFT ), '0' ) . '</span>'; ?></td>
<td><?php echo $orders_check['payment_method']; ?></td>
<td><?php echo date_short( $orders_check['date_purchased'] ); ?></td>
<td><?php echo status_name( $orders_check['orders_status'] ); ?></td>
</tr>
<?php } ?>
</tbody>
</table>
Thank you.