All pastes #968394 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-04-03 00:23 UTC
rendered paste body
	          function content_summary(){
			  if (!isset($_SESSION['isLogin'])) die("You are not logged in, <a href=index.php?act=login>click here</a> to login.");
					$query="SELECT * FROM `content` ORDER BY title ASC";
					$result=mysql_query($query) or die(mysql_error());
					$num=mysql_numrows($result);
					if($i % 4){
					while ($i < $num) {
					$id = htmlentities(mysql_result($result,$i,"id"));
					$title = htmlentities(mysql_result($result,$i,"title"));
					$content = stripslashes(mysql_result($result,$i,"content"));
					$author = htmlentities(mysql_result($result,$i,"author"));
					}
					echo('ID: '.$id.' | Title: '.$title.' | Author: '.$author.'<hr>') ;
					$i++; 
}
}