PHP:
<?php
require ('config.php');
$post_id = (int)$_GET['id'];
if(!isset($post_id) || !is_numeric($post_id) || $post_id < 1)
{
header('Location: index.php');
exit();
}
$result = mysql_query("SELECT * FROM news WHERE id = '$post_id'");
$post = mysql_fetch_assoc($result);
?>
<head>
<title>r3nt3r's blog : <?php echo $post[ime]; ?></title>
<meta name="google-site-verification" content="cBrrEyR8MuFqLPX8OtCiVkyL9-aoYhuHb2NLavoPvLg" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="style.css" rel="stylesheet" />
</head>
<body>
<div class="menu">[<a href="index.php">Начало</a>] [<a href="forme.php">За Мен</a>] [<a href="less.php">Уроци</a>] [<a href="gen.php">Криптиране</a>]</div>
<div id="wrapper">
<div class="box">
<h1><?php echo $post[ime]; ?></h1>
<div class="content">
<table cellpadding="5" cellspacing="0" >
<tr>
<td><?php
echo $post[nowina];
?></td>
<td align="right"><img src="<?php
echo $post[img];
?>" width="150px" height="150px" alt="Картинка към новината" /></td>
</tr>
<tr>
<td></td>
<td align="right">Автор: <?php
echo $post[awtor];
?></td>
</tr>
</table>
</div>
</div>
<div class="spacer"></div>
</div>
<?php
require ('foot.php');
?>
</body>
</html>
-- version 2.11.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 12, 2011 at 04:15 PM
-- Server version: 5.0.90
-- PHP Version: 5.2.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `a8424011_rr`
--
-- --------------------------------------------------------
--
-- Table structure for table `friends`
--
DROP TABLE IF EXISTS `friends`;
CREATE TABLE IF NOT EXISTS `friends` (
`id` int(8) NOT NULL auto_increment,
`link` varchar(255) collate latin1_general_ci NOT NULL,
`img` varchar(255) collate latin1_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=2 ;
--
-- Dumping data for table `friends`
--
INSERT INTO `friends` VALUES(1, 'http://r3nt3rbg.tk', 'http://r3nt3r.herobo.com/banner.png');
-- --------------------------------------------------------
--
-- Table structure for table `news`
--
DROP TABLE IF EXISTS `news`;
CREATE TABLE IF NOT EXISTS `news` (
`nowina` text collate utf8_unicode_ci NOT NULL,
`img` text collate utf8_unicode_ci NOT NULL,
`ime` varchar(255) collate utf8_unicode_ci default NULL,
`awtor` varchar(255) collate utf8_unicode_ci default NULL,
`id` int(11) NOT NULL auto_increment,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=16 ;
--
-- Dumping data for table `news`
--
INSERT INTO `news` VALUES('Добре дошли в блога на r3nt3r
INSERT INTO `news` VALUES('Здравейте ако искате хубаво интро подобно на това драскайте на скайп funki______
[/sql] и като отвора линка read_more.php?id=15 ме препраща към index