Removal of Emails in Posts Emails are automatically removed from posts. Read why, and how to deal with this.
Author
Message
Guest
Posted: Mon Aug 07, 2006 5:22 am Post subject:
my_pagina_class
Subject description: php pagination class
My sql sets up a variable number of fields as well as search values. I get the pagination navigation bar on the first screen, but am kicked into a different navigation set on the second screen. My php pagination script that invokes the my_pagina class is below. Please help.
<?php
include ('my_pagina_class.php');
$test = new MyPagina;
// Generate the SQL command for doing a select from the Database
$searchStmt = "SELECT *
FROM ownerjan,touristjan
WHERE " ;
if ($typ)
$searchStmt .= "ownerjan.typ LIKE '%$typ%' AND ";
if ($city)
$searchStmt .= "ownerjan.city LIKE '%$city%' AND " ;
if ($state)
$searchStmt .= "ownerjan.state LIKE '%$state%' AND " ;
if ($dayB)
$searchStmt .= "touristjan.dayB LIKE '%$dayB%' AND " ;
if ($monthB)
$searchStmt .= "touristjan.monthB LIKE '%$monthB%' AND " ;
if ($yearB)
$searchStmt .= "touristjan.yearB LIKE '%$yearB%' AND " ;
if ($dayE)
$searchStmt .= "touristjan.dayE LIKE '%$dayE%' AND " ;
if ($monthE)
$searchStmt .= "touristjan.monthE LIKE '%$monthE%' AND " ;
if ($yearE)
$searchStmt .= "touristjan.yearE LIKE '%$yearE%' AND " ;
if ($beds)
$searchStmt .= "touristjan.beds LIKE '%$beds%' AND " ;
if ($range)
$searchStmt .= "touristjan.range LIKE '%$range%' AND " ;
$searchStmt .= "ownerjan.username = touristjan.username AND " ;
$test->sql = $stmt; // the (basic) sql statement (use the SQL whatever you like)
$result = $test->get_page_result(); // result set
$num_rows = $test->get_page_num_rows(); // number of records in result set
$nav_links = $test->navigation(" , ", "currentStyle"); // the navigation links (define a CSS class selector for the current link)
$nav_info = $test->page_info("to"); // information about the number of records on page ("to" is the text between the number)
$simple_nav_links = $test->back_forward_link(true); // the navigation with only the back and forward links, use true to use images
$total_recs = $test->get_total_rows(); // the total number of records
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Stand By Oz Accomodation Search</title>
<link rel='stylesheet' type='text/css' href='style.css'>
</head>
Posted: Tue Aug 08, 2006 10:06 am Post subject:
my_pagina_class
Subject description: fix
I fixed it. The class was apparently looking for the _GET array; my form used the post method. The fix was to change this to get as well as referencing the fields with the _GET array. The my_pagina class works quite well!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
If you want to link to this page you can use the following URL:
Example:
The PHP Web-Ring Community
The purpose of this Ring is to link together the best sites and resources on the PHP programming language. Everyone with a quality site is welcome to join. (tutorials, documentation, tips, help, forums,...) (13 members)