PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old October 20th, 2009, 03:12 AM
lakshmiyb lakshmiyb is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 14 lakshmiyb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 39 m 35 sec
Reputation Power: 0
php5 - Pagination inside the menu

hi,
this is my menu code

menu.php
<html>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td align="center" valign="top">
<ul id="nav" class="dropdown dropdown-linear">

<li>
<a href="#" id="pagination">pagination</a>

</li>


</ul>
</td>
</tr>
</table>
<p>&nbsp;</p>
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr valign="top">
<td>
<div id="result" class="functions">

</div>
</td>
</tr>
</table>


<script type="text/javascript">
$.ajaxSetup ({
cache: false
});
var ajax_load = "<img src='images/load.gif' class='loading' alt='loading...' />";

//load() functions

$("#pagination").click(function(){
$("#result").load("pagination.php");
});

</script>

</body>
</html>

i used css to display the result

and
pagination.php

<?php
//connection to db will goes here
$page_name="zpagination.php";
$start=$_GET['start'];
if(strlen($start) > 0 and !is_numeric($start)){
echo "Data Error";
exit;
}

$eu = ($start - 0);
$limit = 10; // No of records to be shown per page.
$this1 = $eu + $limit;
$back = $eu - $limit;
$next = $eu + $limit;

$query2=" SELECT * FROM footer_languages";
$result2=mysql_query($query2);
echo mysql_error();
$nume=mysql_num_rows($result2);

$query=" SELECT * FROM footer_languages limit $eu, $limit ";
$result=mysql_query($query);
echo mysql_error();

while($row = mysql_fetch_array($result))
{
print "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$row['languages'] ."";
}
echo "</table>";
if($nume > $limit ){

echo "<table align = 'center' width='50%'><tr><td align='left' width='30%'>";
if($back >=0) {
print "<a href='$page_name?start=$back'>PREV</font></a>";
}
echo "</td><td align=center width='30%'>";
$i=0;
$l=1;
for($i=0;$i < $nume;$i=$i+$limit){
if($i <> $eu){
echo " <a href='$page_name?start=$i'>$l</font></a> ";
}
else { echo "$l</font>";}
$l=$l+1;
}

echo "</td><td >";

if($this1 < $nume) {
print "<a href='$page_name?start=$next'>NEXT</font></a>";}
echo "</td></tr></table>";

}
?>


when pagination is clicked in menu the out put from pagination page will be displayed inside div class

but when next or prev is clicked it is moving to pagination page
i need all the results to be displayed inside div given in menu.php

can any one heplp me in this , i am waiting for replay

Thanking u in advance

Reply With Quote
  #2  
Old October 21st, 2009, 08:32 AM
lakshmiyb lakshmiyb is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 14 lakshmiyb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 39 m 35 sec
Reputation Power: 0
the problem is solved

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > php5 - Pagination inside the menu


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek