php dynamic pagination logical error - php

I am developing a page where a user can enter the limit of the table in pagination. While I am doing this the data I enter is taken and query is performed according to that. But as I click on another page of that table the value is reset to default which I set to 5 here.
<?php session_start(); ?>
Submit New record<br><br>
<form method="post">
<input type="text" name="dlimit">
<input type="submit" name="submit">
</form>
<?php
$database = 'test';
require 'connection.php';
if(!isset($_POST['submit']))
{
$limit = 5;
}
else
{
$dlimit = $_POST['dlimit'];
$limit = $dlimit;
}
#$id = $_GET['id'];
if($id==""||$id==null)
{
$page=0;
}
else
{
$page = ($id*$limit)-$limit;
}
$qq ="select * from record limit $page,$limit";
$result = $link -> query($qq);
?>
<table border="1"><th>ID</th>
<th>Name</th>
<th>qualification</th>
<th>address</th>
</tr>
<?php
while ($row = mysqli_fetch_object($result))
{
?>
<tr>
<td><?php echo $row->id ?></td>
<td><?php echo $row->user_name ?></td>
<td><?php echo $row->qualification ?></td>
<td><?php echo $row->address ?></td>
</tr>
<?php
}
?>
</table>
<?php
$query = "SELECT * FROM record";
$result = $link -> query($query);
$rows = mysqli_num_rows($result);
$rr = $rows/$limit;
$rr = ceil($rr);
for ($i=1; $i<=$rr ; $i++) {
?>
<?php echo #$i;?>
<?php
}
mysqli_close($link)
?>
Run the above code and check. If my words are not clear to you.

I think that the $_POST data is missing. You click on the link, so the new page will open without POST infos.
You can change this, if you switch to GET instead of POST. You can add the GET parameter to your <a href=""> Tag.
For example
<a href="pagination.php?page=5&dlimit=100
Also try to avoid the #error suppression and don't pass the $_POST/$_GET Vars directly to your sql string. Bad people could use it for SQL Injections

So I got the answer for my question. I am posting it here if anyone need it on later basis.
Submit New record<br><br>
<form method="get">
<input type="text" name="dlimit">
<input type="submit" name="submit">
</form>
<?php
$database = 'test';
require 'connection.php';
if(empty($_GET['dlimit']) && !isset($_GET['submit']) && empty($_GET['n']))
{
$limit = 5;
global $limit;
}
else
{
if (isset($_GET['dlimit']))
{
$limit = $_GET['dlimit'];
}
else
{
#$limit = $_GET['n'];
}
global $limit;
}
if(!isset($_GET['submit'])&& empty($_GET['n']))
{
$n=5;
global $n;
}
else
{
if(empty($_GET['dlimit']))
{
$n=$_GET['n'];
}
else
{
$n=$_GET['dlimit'];
}
global $n;
}
#$id = $_GET['id'];
if($id==""||$id==null)
{
$page=0;
}
else
{
$page = ($id*$limit)-$limit;
}
$qq ="select * from record limit $page,$limit";
$result = $link -> query($qq);
?>
<table border="1"><th>ID</th>
<th>Name</th>
<th>qualification</th>
<th>address</th>
</tr>
<?php
while ($row = mysqli_fetch_object($result))
{
?>
<tr>
<td><?php echo $row->id ?></td>
<td><?php echo $row->user_name ?></td>
<td><?php echo $row->qualification ?></td>
<td><?php echo $row->address ?></td>
</tr>
<?php
}
?>
</table>
<?php
if (!isset($_GET['submit']) && empty($_GET['n'])) {
$n = 5;
global $n;
}
else
{
if (empty($_GET['dlimit'])) {
$n = $_GET['n'];
}
else
{
$n = $_GET['dlimit'];
}
global $n;
}
$query = "SELECT * FROM record";
$result = $link -> query($query);
$rows = mysqli_num_rows($result);
$rr = $rows/$limit;
$rr = ceil($rr);
for ($i=1; $i<=$rr ; $i++) {
?>
<?php echo #$i;?>
<?php
}
mysqli_close($link)
?>
Again I am mentioning here that files which I included here are just connection where I filled my connection details and other is my record entry file where data is entered by the user.

Related

Pagination not working properly after adding in button for admin

I have pagination for a table to display data from the database in the table. This was working fine and I tried to add in a button which only admin's can see. If the user is not an admin they will not see this button. This feature works but once I did it, the pagination only shows one row of data compared to the maximum of 10 per page.
This is my code:
public function dataview($query)
{
$stmt = $this->db->prepare($query);
$stmt->execute();
if($stmt->rowCount()>0) // display records if there are records to display
{
while($row=$stmt->fetch(PDO::FETCH_ASSOC))
{
$poll_id = $row['poll_id'];
$question = $row['question'];
?>
<tr>
<td><?php echo $row['poll_id']; ?></td>
<td><?php echo $row['question']; ?></td>
<td>Open Poll</td>
<td>Results</td>
<?php
$stmt = $this->db->prepare("SELECT * FROM users WHERE user_id=:user_id");
$stmt->execute(array(':user_id'=>$_SESSION['user_session']));
$userRow=$stmt->fetch(PDO::FETCH_ASSOC);
if($stmt->rowCount() > 0){
$admin = $userRow['admin'];
if($admin == 1){
?>
<td>Delete Poll</td>
<?php
?>
</tr>
<?php
}
}
}
}
else
{
?>
<tr>
<td>Nothing here...</td>
</tr>
<?php
}
}
and this is the code on the html page which uses the pagination
<table align="center" border="1" width="100%" height="100%" id="data">
<?php
$query = "SELECT * FROM polls";
$records_per_page=10;
$newquery = $paginate->paging($query,$records_per_page);
$paginate->dataview($newquery);
$paginate->paginglink($query,$records_per_page);
?>
</table>
You are reusing variables like $stmt inside the loop that uses it. So do this:
$stmt = $this->db->prepare($query);
$stmt->execute();
if($stmt->rowCount()>0) // display records if there are records to display
{
while($row=$stmt->fetch(PDO::FETCH_ASSOC))
{
$poll_id = $row['poll_id'];
$question = $row['question'];
?>
<tr>
<td><?php echo $row['poll_id']; ?></td>
<td><?php echo $row['question']; ?></td>
<td>Open Poll</td>
<td>Results</td>
<?php
$stmt2 = $this->db->prepare("SELECT * FROM users WHERE user_id=:user_id");
$stmt2->execute(array(':user_id'=>$_SESSION['user_session']));
$userRow=$stmt2->fetch(PDO::FETCH_ASSOC);
if($stmt2->rowCount() > 0){
$admin = $userRow['admin'];
if($admin == 1){
?>
<td>Delete Poll</td>
<?php
?>
</tr>
<?php
}
}
}
}
else
{
?>
<tr>
<td>Nothing here...</td>
</tr>
<?php
}
I have replace the $stmt inside the loop by $stmt2.

PHP Pagination for user?

I've tried to make a pagination with PHP, but it seems to not work. I want to limit my data which showing in each page, I have this code and it uses PHP code:
showUsers.php
<?php
$query = mysql_query("select * from users");
while ($data = mysql_fetch_array($query)) {
?>
<td><?php echo $data['no_peg']; ?></td>
<td>
<?php
echo $data['username'];
//previlage admin
if ($_SESSION['role'] == 'admin') {
?>
<div class="row-actions">
Edit
<?php if ($data['role'] != 'admin') {?>
| Delete
<?php } ?>
</div>
<?php } ?>
</td>
<td><?php echo $data['fullname']; ?></td>
<td><?php echo $data['telephone']; ?></td>
<td><?php echo $data['email']; ?></td>
I want to show just 10 names per page, to avoid long scrolling, but how can it work?
Hi,if you want to make a pagination, you should add in a LIMIT clause into your queries, like this:
SELECT* FROM users LIMIT 0, 10
With two arguments, the first argument specifies the offset of the first row to return, and the second specifies the maximum number of rows to return.
So, what's the next?
You need to add a parameter to your query url specifies the number of page when you list the users.
Such as:
showUsers.php?page=1
Then, in your program, you can get parameter by this:
$page = isset($_GET['page']) ? $_GET['page'] : 1;
I hope it will help you, I'm new here.
<?php
$sqlCount = "select count(id_user) from users";
$rsCount = mysql_fetch_array(mysql_query($sqlCount));
$totalData = $rsCount[0];
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$limit = 10;
$start_from = $limit * ($page - 1);
$sql_limit = "SELECT * FROM users limit $start_from, $limit";
$result = mysql_query($sql_limit);
while ($data = mysql_fetch_array($result)) {
?>
<td><?php echo $data['no_peg']; ?></td>
<td>
<?php
echo $data['username'];
//previlage admin
if ($_SESSION['role'] == 'admin') {
?>
<div class="row-actions">
Edit
<?php if ($data['role'] != 'admin') {?>
| Delete
<?php } ?>
</div>
<?php } ?>
</td>
<td><?php echo $data['fullname']; ?></td>
<td><?php echo $data['telephone']; ?></td>
<td><?php echo $data['email']; ?></td>
</tr>
<?php
}
?>
<?php
$totalPage = ceil($totalData / $limit);
echo 'Page : ';
for($i = 1; $i <= $totalPage; $i++){
if($page != $i){
echo '['.$i.'] ';
}else{
echo "[$i] ";
}
}
?>
Where is your pagination code? Your code just shows this query:
$query = mysql_query("select * from users");
But for basic pagination you need to set a LIMIT like so:
$query = mysql_query("select * from users LIMIT 0,10");
So that would only grab the first 10 items. And then—let’s say, on page 2 you could do this:
$query = mysql_query("select * from users LIMIT 11,10");
That would grab the next 10 items starting from item 11.
That’s the basic concept. But you have to code the logic for passing along pagination values & such.
<?php
if(is_int($_GET('pageNo'))) // getting the page number from the URL i.e script.php?pageNo=2
{
$query = mysql_query("select * from users limit ".$_GET['pageNo']." ,10");
while ($data = mysql_fetch_array($query)) {
?>
<td><?php echo $data['no_peg']; ?></td>
<td>
<?php
echo $data['username'];
//previlage admin
if ($_SESSION['role'] == 'admin') {
?>
<div class="row-actions">
Edit
<?php if ($data['role'] != 'admin') {?>
| Delete
<?php } ?>
</div>
<?php } ?>
</td>
<td><?php echo $data['fullname']; ?></td>
<td><?php echo $data['telephone']; ?></td>
<td><?php echo $data['email']; ?></td>
</tr>
<?php
}
} // not sure where the closing if should be you figure it out :P
?>

PHP array is not saving two last elements

I'm trying to copy from one array to another but only unique values. I use for loop and when I debug all 10 blues are shown but after for loop the last 2 values are gone.
I debug each array element during the "for loop" and it seems fine coz I see all 10 elements. The problem starts after the for loop. E.g. If I want to print the 9th element it doesn't print it, i.e. it shows emty.
What can be the proble?
P.S> I've tried array_unique(), same output so its not it.
Here is my code:
<?php
session_start();
error_reporting(E_ALL ^ E_NOTICE); //to remove annoying notices
include 'connectDB.php';
$queryISBN = mysql_query("SELECT * FROM booksread");
$numrows = mysql_num_rows($queryISBN);
if($numrows!=0)
{
$isbn_array = array();
while($row = mysql_fetch_assoc($queryISBN))
{
$isbn_array[]=$row['ISBN'];
}
$isbn_unique = array();
for ($i=0;$i<count($isbn_array );$i++)
{
if(!in_array($isbn_array[$i],$isbn_unique ))
{
$isbn_unique[$i]=$isbn_array[$i];
echo $isbn_unique[$i]." ---- ";
}
}
}
echo "<h1>Select books you would like to view</h1>";
$submit = $_POST['submit'];
if(isset($_POST['selectedbooks']))
{
$checked = $_POST['selectedbooks'];
}
if($submit)
{
if(!isset($checked))
{
echo "You must check at least one book.";
}
else
{
$_SESSION['checked'] = $checked;
header("location: view_entries_results.php");
}
}
?>
<html>
<body>
<form action="view_entries.php" method="POST">
<table>
<table border="1">
<th>ISBN<th>Title<th>Author<th>Select</th>
<?php
echo "Arr size: ".count($isbn_unique )." </br>";
echo "8: ".$isbn_unique[7]."</br>";
for ($j=0;$j<count($isbn_unique );$j++)
{
$curElement = $isbn_unique[$j];
echo "Cur el: ".$curElement;
$queryBook = mysql_query("SELECT * from book WHERE ISBN='$curElement'");
while ($row = mysql_fetch_assoc($queryBook))
{
$ISBN = $row['ISBN'];
$title = $row['Title'];
$author = $row['Authorname'];
}
?>
<tr>
<td><?php echo $ISBN; ?></td>
<td><?php echo $title; ?></td>
<td><?php echo $author; ?></td>
<td><input type="checkbox" name="selectedbooks[]" value="<?php echo $ISBN; ?>"/>
</tr>
<?php } ?>
</table>
<p><input type="submit" name="submit" value="Add Entry" /></p>
</form>
</body>
</html>
I think
if(!in_array($isbn_array[$i],$isbn_unique ))
{
$isbn_unique[$i] = $isbn_array[$i];
echo $isbn_unique[$i]." ---- ";
}
should be
if(!in_array($isbn_array[$i],$isbn_unique ))
{
$isbn_unique[] = $isbn_array[$i];
echo $isbn_array[$i]." ---- ";
}
I think you have duplicate values in $isbn_array, so its skip keys as its already in array and hence size of $isbn_unique is different then then the $isbn_array. Try to debug on that.

Show all rows in mysql table then give option to delete specific ones

I want to have the ability to show all the entries in a database table and by each one give the user the ability to delete specific ones.
I am currently using a for each loop that loops through the database showcasing each entry.
$result = mysql_query("SELECT * FROM KeepScores");
$fields_num = mysql_num_fields($result);
echo "<table><tr>";
// printing table headers
echo "<td>Recent Posts</td>";
echo "</tr>\n";
// printing table rows
while($row = mysql_fetch_row($result))
{
echo "<tr>";
// $row is array... foreach( .. ) puts every element
// of $row to $cell variable
foreach($row as $cell)
echo "<td>$cell</td>";
echo "</tr>\n";
}
How would to add a delete button that appears by each one and removes the entry from the database table?
You can do it with forms:
//main.php
<?php $result = mysql_query("SELECT * FROM KeepScores"); ?>
<table>
<tr>
<td>Recent Posts</td>
</tr>
<?php while($row = mysql_fetch_array($result)) : ?>
<tr>
<td><?php echo $row['field1']; ?></td>
<td><?php echo $row['field2']; ?></td>
<!-- and so on -->
<td>
<form action="delete.php" method="post">
<input type="hidden" name="delete_id" value="<?php echo $row['id']; ?>" />
<input type="submit" value="Delete" />
</form>
</td>
</tr>
<?php endwhile; ?>
</table>
//delete.php:
<?php
if(isset($_POST['delete_id'] && !empty($_POST['delete_id']))) {
$delete_id = mysql_real_escape_string($_POST['delete_id']);
mysql_query("DELETE FROM KeepScores WHERE `id`=".$delete_id);
header('Location: main.php');
}
Or you can do it with jQuery and AJAX:
//main.php
<?php $result = mysql_query("SELECT * FROM KeepScores"); ?>
<table>
<tr>
<td>Recent Posts</td>
</tr>
<?php while($row = mysql_fetch_array($result)) : ?>
<tr id="<?php echo $row['id']; ?>">
<td><?php echo $row['field1']; ?></td>
<td><?php echo $row['field2']; ?></td>
<!-- and so on -->
<td>
<button class="del_btn" rel="<?php echo $row['id']; ?>">Delete</button>
</td>
</tr>
<?php endwhile; ?>
</table>
<script>
$(document).ready(function(){
$('.del_btn').click(function(){
var del_id = $(this).attr('rel');
$.post('delete.php', {delete_id:del_id}, function(data) {
if(data == 'true') {
$('#'+del_id).remove();
} else {
alert('Could not delete!');
}
});
});
});
</script>
//delete.php
<?php
if(isset($_POST['delete_id'] && !empty($_POST['delete_id']))) {
$delete_id = mysql_real_escape_string($_POST['delete_id']);
$result = mysql_query("DELETE FROM KeepScores WHERE `id`=".$delete_id);
if($result !== false) {
echo 'true';
}
}
It's all untested and sure needs some adjustment for your specific project, but I think you get the idea and I hope it helps.
Next time, please post your schema if you ask stuff about database.
I thought I would improve on this a little bit by wrapping the delete post in a class and function. I was having the same problem. and this worked great for me. Thanks again # Quasdunk
<?php
// Class to hold the remove post function
class someClass{
//Function for removing the post
function removePost(){
if(isset($_POST['delete_id']) && (!empty($_POST['delete_id']))) {
$delete_id = mysql_real_escape_string($_POST['delete_id']);
$result = mysql_query("DELETE FROM post WHERE post_id='".$delete_id."' AND post_member='" . $_SESSION['SESS_USER'] . "'");
if($result !== false) {
echo 'true';
}
}
}
}
if(isset($_SESSION['SESS_MEMBER_ID'])){
$member = $_SESSION['SESS_USER'];
$res = mysql_query("SELECT * FROM post WHERE post_member='$member' ORDER BY timestamp DESC") or die(mysql_error());
$i = new someClass;
while($row = mysql_fetch_array($res)){
echo '<div style="width:100%;margin:0 auto;border-top:thin solid #000;">';
echo '<div style="width:600px;margin:0 auto;padding:20px;">';
echo $row['post_text'] . '<br>';
$postID = $row['post_id'];
echo '<div style="border-top:thin solid #000;padding:10px;margin-top:5px;background-color:#CCC;">';
echo 'You posted this on: ' . $row['post_date'] . '#' . $row['post_time'];
echo '<div style="float:right;">
<form method="post" action="'. $i->removePost() .'">
<input type="hidden" name="delete_id" value="'.$row['post_id'].'" >
<input type="submit" value="Delete Post">
</form>
</div>';
echo '</div>';
echo '</div>';
echo '</div>';
}
}
?>
Produce a key to each table, using jquery,then link it to a php file which an accept the key and delete from the specific table (which also can be passed through jquery)

How can I get the selected category id after 1st page in pagination?

<?php
include "includes/connection.php";
//$id=$_REQUEST['category'];
//$catid=mysql_escape_string($id);
$catid = isset($_GET['category']) ? (int)$_GET['category'] : 0;
$recordsPerPage =4;
# 0
// //default startup page
$pageNum = 1;
if(isset($_GET['p']))
{
$pageNum = $_GET['p'];
settype($pageNum, 'integer');
}
$offset = ($pageNum - 1) * $recordsPerPage;
//set the number of columns
$columns = 1;
//set the number of columns
$columns = 1;
$query = "SELECT temp_id, temp_img, temp_header, temp_resize, temp_small, temp_name, temp_type, cat_id, col_id, artist_id FROM `templates` where cat_id = '{$catid}' ORDER BY `temp_id` DESC LIMIT $offset, $recordsPerPage";
$result = mysql_query($query);
//we add this line because we need to know the number of rows
$num_rows = mysql_num_rows($result);
echo "<div>";
//changed this to a for loop so we can use the number of rows
for($i = 0; $i < $num_rows; $i++) {
while($row = mysql_fetch_array($result)){
if($i % $columns == 0) {
//if there is no remainder, we want to start a new row
echo "<div class='template'>";
}
echo ...........my data(s).
if(($i % $columns) == ($columns - 1) || ($i + 1) == $num_rows) {
echo "</div>";
}
}
}
echo "</div>";
//}
?>
<div class="pagination">
<?
$query = "SELECT COUNT( temp_id ) AS `temp_date` FROM `templates` where cat_id ='{$catid}'";
$result = mysql_query($query) or die('Mysql Err. 2');
$row = mysql_fetch_assoc($result);
$numrows = $row['temp_date'];
//$numrows = mysql_num_rows($result);
$self = $_SERVER['PHP_SELF'];
$maxPage = ceil($numrows/$recordsPerPage);
$nav = '';
for($page = 1; $page <= $maxPage; $page++)
{ if ($page == $pageNum)
{
$nav .= "<span class=\"pegination-selected\">$page</span>";
}
else
{
$nav .= "<aa class=\"pegination\" hreeef=\"javascript:htmlData('$self','p=$page')\">$page</a>";
}
}
if ($pageNum > 1)
{
$page = $pageNum - 1;
$prev = "<aa class=\"pagination\" hreeef=\"javascript:htmlData('$self','p=$page')\"><strong><imgee src=\"images/previous.gif\" alt=\"previous\" width=\"5\" height=\"10\" border=\"0\"/></strong></a>";
$first = "<aa class=\"pagination\" hreeef=\"javascript:htmlData('$self','p=1')\"><strong><imgee src=\"images/previous1.gif\" alt=\"first\" width=\"7\" height=\"10\" border=\"0\" /></strong></a>";
}
else
{
$prev = '<strong> </strong>';
$first = '<strong> </strong>';
}
if ($pageNum < $maxPage)
{
$page = $pageNum + 1;
$next = "<aa hreeef=\"javascript:htmlData('$self','p=$page')\"> <strong> <imgee src=\"images/next.gif\" alt=\"next\ width=\"5\" height=\"10\" border=\"0\" /></strong></a>";
$last = "<a class=\"pagination\" hreeef=\"javascript:htmlData('$self','p=$maxPage')\"> <strong> <imgee src=\"images/next1.gif\" alt=\"next\" border=\"0\" width=\"7\" height=\"10\" /></strong></a>";
}
else
{
$next = '<strong> </strong>';
$last = '<strong> </strong>';
}
echo "<div class=\"pagination\"> $first $prev <span class=\"pagination-selected\">$nav </span> $next $last </div>";
?>
Here my ajax code:
function GetXmlHttpObject(handler)
{
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}
function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("txtResult").innerHTML=xmlHttp.responseText
}
else
{
//alert(xmlHttp.status);
}
}
function htmlData(url, qStr)
{
if (url.length==0)
{
document.getElementById("txtResult").innerHTML="";
return;
}
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request");
return;
}
url=url+"?"+qStr;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true) ;
xmlHttp.send(null);
}
How can I get the selected category id after 1st page in pagination?
Do you pass though category in the request? You haven't given us that information (what is the value of qstr in the javascript?), but I'd guess not.
You're also passing it straight into an SQL query, which leaves you open to injection.
You should use mysql_escape_string() to fix that.
Post it with the AJAX call and return it
Store it in a local JS variable
Add it to the URL
...
You seem to be aware that $_GET['p'] gets the value of the 'p' parameter passed in the querystring. Well $_REQUEST['category'] is doing the same thing. (Technically $_REQUEST checked everything in $_POST, $_GET and $_COOKIE).
So if you haven't set the 'category' in the querystring then it wont contain anything in your code.
You should add ?category=XXX&sid=RAND... to your url
Better use $category = isset($_GET['category']) ? (int)$_GET['category'] : 0;
<?php
include ('database connection file ');
?>
**and this is my index.php**
<?php
if(isset($_GET['page']))
{
$page=$_GET['page'];
$offset=$limit * ($page - 1);
}
else{
$page=1;
$offset=0;
}
if($page==0 || $page > $page_rec){
header('location:index.php?page=1');
}
?>
<body>
<div>
<div class="headingSec"> <h1 align="center">Welcome AdminLogout</h1>
<p align="center">Manage your student database here.</p></div>
<table class="trBgColr">
<thead class="bgColorSec">
<th>Registration Id</th>
<th>Image</th>
<th>Signature</th>
<th>Name</th>
<th>Father's Name</th>
<th>City</th>
<th>Registration Category</th>
<th>Phone Number</th>
<th>Mobile Number</th>
<th>Status</th>
<th>
</thead>
<?php
//$getstudentdetails = "select * from student_details";
$result=mysqli_query($conn,"select * from `student_details` LIMIT $offset,$limit");
/* fetch associative array */
while($row = mysqli_fetch_array($qry)) {
?>
<tr>
<td><?php echo $row["registration_number"]; ?>
<td><?php echo $row["Name"]; ?></td>
<td><?php echo $row["Father_Name"]; ?></td>
<td><?php echo $row["City"]; ?></td>
<td><?php echo $row["Registration_Category"]; ?></td>
<td><?php echo $row["Phone_Number"]; ?></td>
<td><?php echo $row["Mobile_Number"]; ?></td>
<?php if($row['payment_status']==1)
{?>
<td><?php echo "Sucsess"; ?></td>
<?php
}
else{
?>
<td><?php echo "Failed"; ?></td>
<?php
}?>
<?php
}
$pre=$page - 1;
$next=$page + 1;
?>
</tr>
</table>
</div>
<br />
<br />
<div class="pagination">
<?php
for($i=1;$i<=$page_rec;$i++){
continue;
?>
<?php $i;?>
<?php } ?>
Previous«
Next»

Categories