Tak já už prostě nevím ..
kod pro vložení do databáze :
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8"">
<title>Redakční systém</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?php
$nadpis=$_POST["nadpis"];
$redakce=$_POST["redakce"];
$datum=$_POST["datum"];
$novinka = "<div class=\"redakce\"><h2>$nadpis</h2><p class=\"p\">$redakce</p><p class=\"datum\">Datum:$datum</p></div>";
$db="mysql42733";
$tb="redakce";
$spojeni=mysql_connect("hz-mysql3","mysql40769"," ");
mysql_set_charset('utf8');
mysql_select_db($db, $spojeni);
mysql_query("INSERT INTO $tb values ('','$novinka')", $spojeni);
echo($redakce);
//header("Location: redaknisystem.php");
?>
</body>
</html>
Kód pro vypsání z databáze:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8"">
<title> </title>
<!--[if IE]>
<link rel="nofollow" href="css/stylyIE.css" rel="stylesheet" type="text/css">
<![endif]-->
<link rel="nofollow" href="css/styly.css" rel="stylesheet" type="text/css">
<script>
function prdel() {
var div2= document.getElementById("obsah2").clientHeight;
if (div2 >= 530) document.getElementById("obsah").style.height= "auto";
}
</script>
</head>
<body onLoad="prdel()">
<div id="stranka">
<div id="logo">
<div id="menu">
<?php include_once("menu.htm") ?>
</div>
</div>
<div id="menu2">
<?php include_once("menu2.htm") ?>
</div>
<div id="obsah" style="background-color:#FFFFFF;">
<div id="obsah2">
<p> </p>
<?
$spojeni=mysql_connect("hz-mysql3","mysql40769"," ");
mysql_select_db('mysql42733');
mysql_set_charset('utf8');
$navrat=mysql_query( 'SELECT `redakce`.`text`'
. ' FROM `redakce`'
. ' ORDER BY `redakce`.`text` DESC LIMIT 0, 5 ', $spojeni);
echo mysql_error();
while (list($text) = mysql_fetch_row($navrat))
printf($text);?>
</div>
</div>
</div>
</body>
</html>
nastavení tabulek v databázi :