hi below is my code. -
<?php
-
include("Globals.php");
-
$connection = mysql_connect("localhost","root","drmz");
-
mysql_select_db("drmzmove");
-
-
$Room = mysql_query("select id, ordre, name, e_name, f_name, p_name, color from Rooms where id ='" . get_id("id")."'");
-
$Room = mysql_fetch_assoc($Room);
-
-
$room1=$_REQUEST['id'];
-
$query=mysql_query("select name from rooms where id=$room1");
-
while($row=mysql_fetch_array($query,MYSQL_ASSOC))
-
{
-
$array=$row['name'];
-
}
-
?>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
<html xmlns="http://www.w3.org/1999/xhtml">
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-
<title>My Photo Gallery</title>
-
<link href="dreamzproperties.css" rel="stylesheet" type="text/css" />
-
-
-
</head>
-
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
-
<table border="0" cellpadding="0" cellspacing="0">
-
<tr>
-
<td colspan="3"><?php include("header.php"); ?></td>
-
</tr>
-
-
<tr valign="top">
-
<td width="1" align="center"><?php include("lf.php"); ?></td>
-
<td width="699">
-
-
<!-- body start -->
-
-
<table width="100%" height="920" border="0" cellpadding="0" cellspacing="0" class="middle_border">
-
<tr>
-
<td align="center" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
-
<tr>
-
<td align="center" valign="middle"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
-
<tr>
-
<td align="center" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
-
<tr>
-
<td align="left" valign="middle" bgcolor="#666666" class="heading1"><table width="100" height="20" border="0" cellpadding="0" cellspacing="0">
-
<tr>
-
<td width="15" bgcolor="#FF9900"> </td>
-
<td width="85" align="center" valign="middle"><?php echo $array;?></td>
-
</tr>
-
</table></td>
-
</tr>
-
</table>
-
<table width="100%" border="0" cellspacing="2" cellpadding="2">
-
<tr>
-
<td align="center" valign="top">
-
<?
-
$Pictures = mysql_query("select id, name from Pictures where Room_id ='" . $HTTP_GET_VARS["id"] . "' order by ordre");
-
-
$NextRoom = mysql_query("select id from Rooms where id!='" . $HTTP_GET_VARS["id"] .
-
"' and ordre >='" . $Room["ordre"] . "' order by ordre limit 1");
-
-
if(!($NextRoom = mysql_fetch_assoc($NextRoom)))
-
{
-
$NextRoom = mysql_query("select id from Rooms order by ordre limit 1");
-
-
$NextRoom = mysql_fetch_assoc($NextRoom);
-
}
-
-
$PreviousRoom = mysql_query("select id from Rooms where id!='" . $HTTP_GET_VARS["id"] .
-
"' and ordre <='" . $Room["ordre"] . "' order by ordre desc limit 1");
-
-
if(!($PreviousRoom = mysql_fetch_assoc($PreviousRoom)))
-
{
-
$PreviousRoom = mysql_query("select id from Rooms order by ordre desc limit 1");
-
-
$PreviousRoom = mysql_fetch_assoc($PreviousRoom);
-
}
-
?>
-
<table align="center" cellspacing ="3" cellpadding="3">
-
<?
-
$NumberOfColumns = 4;
-
?>
-
<tr>
-
<td align="center" colspan="<?= $NumberOfColumns ?>"><table width="100%">
-
<tr>
-
<td align="left" width="33%"><a href="gallery_room.php?id=<?= $PreviousRoom["id"] ?>">Previous</a></td>
-
<td align="center" width="33%"><a href="gallery.php">Photogallery Index</a></td>
-
<td align="right"><a href="gallery_room.php?id=<?= $NextRoom["id"] ?>">Next</a></td>
-
</tr>
-
</table></td>
-
</tr>
-
<tr>
-
<?
-
$Column = 0;
-
while($Picture = mysql_fetch_assoc($Pictures)) {
-
?>
-
<td bgcolor="<?= $Room["color"]; ?>" valign="top"><table width="100" border="0" align="left" cellpadding="0" cellspacing="0" class="img_border">
-
<tr>
-
<td align="left" valign="top"><a href="gallery_picture.php?id=<?= $Picture["id"]; ?>" target="_blank"><img src="<?= $Room["name"] ?>_<?= $Room["id"] ?>/ThumbNails/<?= $Picture["name"] ?>_<?= $Picture["id"] ?>.jpg"
-
width="130" height="100" hspace="4" vspace="4" border="1" class="middleborder" /></a></td>
-
</tr>
-
</table> <a href="gallery_picture.php?id=<?= $Picture["id"]; ?>" target="_blank"></a></td>
-
<?
-
$Column++;
-
if($Column % $NumberOfColumns == 0) {
-
?>
-
</tr>
-
<tr>
-
<?
-
}
-
}
-
?>
-
</tr>
-
</table>
-
<?
-
mysql_free_result($Pictures);
-
mysql_close($connection)
-
?> </td>
-
</tr>
-
</table></td>
-
</tr>
-
</table></td>
-
</tr>
-
</table></td>
-
</tr>
-
</table>
-
-
<!-- end of body --> </td>
-
<td width="2"><?php include("rf.php"); ?></td>
-
</tr>
-
-
-
<tr>
-
<td colspan="3"><?php include("footer.php"); ?></td>
-
</tr>
-
</table>
-
</body>
-
</html>
-
<?php //require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
how to put paging to this page.
thanks,
keerthi.
4 1436
Hi,
could you please re-post the code using the code tags...
Thanks
[PHP]<?php
include("Global s.php");
$connection = mysql_connect(" localhost","roo t","drmz");
mysql_select_db ("drmzmove") ;
$Room = mysql_query("se lect id, ordre, name, e_name, f_name, p_name, color from Rooms where id ='" . get_id("id")."' ");
$Room = mysql_fetch_ass oc($Room);
$room1=$_REQUES T['id'];
$query=mysql_qu ery("select name from rooms where id=$room1");
while($row=mysq l_fetch_array($ query,MYSQL_ASS OC))
{
$array=$row['name'];
?>
[/PHP]
[HTML]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>My Photo Gallery</title>
<link href="dreamzpro perties.css" rel="stylesheet " type="text/css" />
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0 ">
<table border="0" cellpadding="0" cellspacing="0" >
<tr>
<td colspan="3"><?p hp include("header .php"); ?></td>
</tr>
<tr valign="top">
<td width="1" align="center"> <?php include("lf.php "); ?></td>
<td width="699">
<!-- body start -->
<table width="100%" height="920" border="0" cellpadding="0" cellspacing="0" class="middle_b order">
<tr>
<td align="center" valign="top"><t able width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr>
<td align="center" valign="middle" ><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFF F">
<tr>
<td align="center" valign="middle" ><table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td align="left" valign="middle" bgcolor="#66666 6" class="heading1 "><table width="100" height="20" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td width="15" bgcolor="#FF990 0"> </td>
<td width="85" align="center" valign="middle" ><?php echo $array;?></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="2" cellpadding="2" >
<tr>
<td align="center" valign="top">
[/html]
[php]
<?
$Pictures = mysql_query("se lect id, name from Pictures where Room_id ='" . $HTTP_GET_VARS["id"] . "' order by ordre");
$NextRoom = mysql_query("se lect id from Rooms where id!='" . $HTTP_GET_VARS["id"] .
"' and ordre >='" . $Room["ordre"] . "' order by ordre limit 1");
if(!($NextRoom = mysql_fetch_ass oc($NextRoom)))
{
$NextRoom = mysql_query("se lect id from Rooms order by ordre limit 1");
$NextRoom = mysql_fetch_ass oc($NextRoom);
}
$PreviousRoom = mysql_query("se lect id from Rooms where id!='" . $HTTP_GET_VARS["id"] .
"' and ordre <='" . $Room["ordre"] . "' order by ordre desc limit 1");
if(!($PreviousR oom = mysql_fetch_ass oc($PreviousRoo m)))
{
$PreviousRoom = mysql_query("se lect id from Rooms order by ordre desc limit 1");
$PreviousRoom = mysql_fetch_ass oc($PreviousRoo m);
}
?>
<table align="center" cellspacing ="3" cellpadding="3" >
<?
$NumberOfColumn s = 3;
?>
<tr>
<td align="center" colspan="<?= $NumberOfColumn s ?>"><table width="100%">
<tr>
<td align="left" width="33%"><a href="gallery_r oom.php?id=<?= $PreviousRoom["id"] ?>">Previous</a></td>
<td align="center" width="33%"><a href="gallery.p hp">Photogaller y Index</a></td>
<td align="right">< a href="gallery_r oom.php?id=<?= $NextRoom["id"] ?>">Next</a></td>
</tr>
</table></td>
</tr>
<tr>
<?
$Column = 0;
while($Picture = mysql_fetch_ass oc($Pictures)) {
?>
<td bgcolor="<?= $Room["color"]; ?>" valign="top"><t able width="100" border="0" align="left" cellpadding="2" cellspacing="2" class="img_bord er">
<tr>
<td align="left" valign="top"><a href="gallery_p icture.php?id=< ?= $Picture["id"]; ?>" target="_blank" ><img src="<?= $Room["name"] ?>_<?= $Room["id"] ?>/ThumbNails/<?= $Picture["name"] ?>_<?= $Picture["id"] ?>.jpg"
width="130" height="100" hspace="4" vspace="4" border="1" class="middlebo rder" /></a></td>
</tr>
</table> <a href="gallery_p icture.php?id=< ?= $Picture["id"]; ?>" target="_blank" ></a></td>
<td> </td>
<?
$Column++;
if($Column % $NumberOfColumn s == 0) {
?>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<?
}
}
?>
</tr>
</table>
<?
mysql_free_resu lt($Pictures);
mysql_close($co nnection)
?> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<!-- end of body --> </td>
<td width="2"><?php include("rf.php "); ?></td>
</tr>
<tr>
<td colspan="3"><?p hp include("footer .php"); ?></td>
</tr>
</table>
</body>
</html>
<?php //require(DIR_WS_ INCLUDES . 'application_bo ttom.php'); ?>
[/PHP]
Next time use the [php] tag. :D
hi no body there to solve my problem? atleast can any one send the paging code.
thanks,
keerthi
code green 1,726
Recognized Expert Top Contributor
hi no body there to solve my problem? atleast can any one send the paging code
What is the problem?
Where is the problem occuring?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Li |
last post by:
Hi, guys,
I got a problem when trying to paging the recordset. the problem is
even I set the pagesize but the first page will always show all the
records and the number of records that shown on the second page will
always all records number minus pagesize. for example, if I have total
5 records and pagesize = 2, then first page will show 5 record and
second one will show 3 and the last page will show the last one.
any one have some...
|
by: sara |
last post by:
Hi all,
I have a strange problem. I have a page where I am
creating a recordset that can handle paging and the query
for it was originally selecting from only one table. This
was all working nicely, including the paging. I have now
changed the query to select from two joined tables and
suddenly it tells me that my recordset does not support
paging. Why is this?
Any help would be much appreciated,
|
by: Daniel Walzenbach |
last post by:
Hi,
I have a question regarding the DataGrid control. If paging is enabled the
grid binds the data, sets the paging on the top/bottom (or however it is set
up) and throws away unnecessary data. So far so good for a tiny amount of
data but if some 100000 of rows are the source this approach is stupid.
|
by: saleek |
last post by:
Hi,
I am trying to figure out why my datagrid has stopped firing the page and
sort commands.
Scenario:
I originally had template columns in my datagrid and had set up custom
bi-directional sorting as well as paging of the datagrid records.
|
by: farhad13841384 |
last post by:
Hi , I Hope You fine.
I have some problem with this code for paging in asp.net
this bottom code work correctly without any error but when
I try to place separate code in .VB file then error is begin and occured .I want to separate this code and compiling .vb code using VBC.exe later .(bin/paging.dll)
when do it like me so you retrive only < Previous Page Next Page > in your web browser and you don't retrive list Of data in your web browser....
| |
by: antonyliu2002 |
last post by:
I've been googling for some time, and could not find the solution to
this problem.
I am testing the paging feature of gridview. I have a very simple web
form on which the user can select a few fields to be included in the
table, which is to be bound to the gridview.
The web form looks like so (Don't worry about the stupidity of this
web form for now.):
|
by: rn5a |
last post by:
In a shopping cart app, a ASPX page retrieves the order details &
personal details of a user from a MS-Access database table depending
upon the username of the user.
The order details of a particular order (like ProductID, Name,
Description, Quantity etc.) are displayed in one DataGrid where as the
personal details of the buyer corresponding to this order (like Name,
E-Mail, Shipping & Billing Address etc.) are displayed in another...
|
by: =?Utf-8?B?SmVmZiBCZWVt?= |
last post by:
The default paging behavior of the gridview doesn't work well with very large
sets of data which means we have to implement some sort of custom paging.
The examples I have seen (4guysfromrolla, etc.) suggest using an
ObjectDataSource which has built-in paging functionality that, when used in
conjunction with certain SQL 2005 functionality, only works with the records
to be displayed on the page rather than the entire set. The problem with...
|
by: =?Utf-8?B?TG95b2xhIHN0YWxpbg==?= |
last post by:
Hi,
I am using ASP.Net 2.0 version and Windows'XP OS. I am useing the Grid view
control to display the user details along with the paging concept provided by
the grid view control.
When i click the paging link (2,3,4.. ) it produces the result properly, But
my problem is when i tried to press the Refresh button in the explorer,
it throws the following popup alert message
|
by: wallconor |
last post by:
Hi,
I am having a problem using Dreamweaver CS3 standard recordset paging behavior. It doesn’t seem to work when I pass parameter values from a FORM on my search page, to the recordset on my results page.
- Recordset Paging works if no parameters are used in the recordset sql code (ie. simple sql code):
SELECT *
FROM db_name
WHERE (db_field1 LIKE ‘%text1%’ OR db_field2 LIKE ‘%text2%’)
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |