O Flash,
Thanks for coding , sadly ur codeing i couldnt use it, i got puzzeled, hey u mind if u look into my coding , i have givein the table also, plz hlp am running into this proble for so long ! Thakns i will really appreciate u
Codings
***********************************************************
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conn = "localhost";
$database_conn = "tol";
$username_conn = "root";
$password_conn = "";
$conn = mysql_pconnect($hostname_conn, $username_conn, $password_conn) or trigger_error(mysql_error(),E_USER_ERROR);
?>
<?php require_once('file:///C|/web/tol.com/Connections/conn.php'); ?>
<?php
$maxRows_Recordset1 = 3;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
mysql_select_db($database_conn, $conn);
$query_Recordset1 = "SELECT title, content, link FROM news";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $conn) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "*www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<table width="150" border="1">
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['title']; ?></td>
</tr>
<tr>
<td><?php echo $row_Recordset1['content']; ?></td>
</tr>
<tr>
<td><?php echo $row_Recordset1['link']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
Table
**********************************************************
# Table structure for table `news`
#
CREATE TABLE `news` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` varchar(200) NOT NULL default '',
`content` longtext NOT NULL,
`author` varchar(20) NOT NULL default '',
`link` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=10 ;
#
# Dumping data for table `news`
#
INSERT INTO `news` VALUES (1, 'JPEG', 'WindowPCs that are unpatched are vulnerabe to attacks by harmless image files. Picture in the JPEG ', 'karma', 'click more');
INSERT INTO `news` VALUES (3, 'Thsechu', '<img src=*localhost/tol.com/images/mask.jpg width=47 height=47 border=1>\r\n <img src=*localhost/tol.com/images/phob.jpg width=47 height=47 border=1>
\r\nForm of arts and craft through \r\n centuries of influence by its culture...', '', 'click more');
INSERT INTO `news` VALUES (4, 'Highlights', '<img src=*localhost/tol.com/images/mask.jpg width=47 height=47 border=1>\r\n <img src=*localhost/tol.com/images/phob.jpg width=47 height=47 border=1>
\r\nForm of arts and craft through \r\n centuries of influence by its culture...', 'asasa', 'click more');