<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>yoink</title>
<link href="yoink.css" rel="stylesheet" type="text/css" />
[removed]
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent;.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
[removed]

</head>

<body>

<div id="wrapper">

 <div id="knapwrapper">
    
    <div id="venstreside"><img src="billeder/venstreside.png" width="205" height="44" /></div>
    
    <div id="forside">
      <a href="index.php"><img src="billeder/forside.png" name="forside" width="104" height="44" border="0" id="forside2" /></a>
      </div>
    
    <div id="yoink">
      <a href="yoink.php"><img src="billeder/yoink.png" name="yoinkk" width="104" height="44" border="0" id="yoinkk" /></a>
      </div>
    
    <div id="nac">
      <a href="#"><img src="billeder/nac.png" name="nac" width="104" height="44" border="0" id="nac2" /></a>
      </div>
    
    <div id="wtf">
      <a href="#"><img src="billeder/wtf.png" name="wtf" width="104" height="44" border="0" id="wtf2" /></a>
      </div>
    
    <div id="hoejreside"><img src="billeder/hoejreside.png" width="205" height="44" /></div>
    
</div>


<?php
$navn = $_POST['navn'];
$kommentar = $_POST['kommentar'];
?>


 <div id="introtext"><h1>Post to me or follow up on me posting to myself !</h1></div>

<div id="post">

<!-- HER STARTER FORMEN -->

<form action="insert.php" method="post">
Navn: <input type="text" name="navn">
<br  />
<textarea rows="4" cols="60" name="kommentar">
</textarea>
<br  />
<input type="submit" value="submit" />
</form>

</div>

-- FORM SLUT --


-- INSERT.PHP -- 


<body>
<?php
$db = mysql_connect("localhost","root","");
if (!$db)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("nactown", $db);

$sql="INSERT INTO kommentarer ('navn', 'kommentar')";


if (!mysql_query($sql,$db))
  {
  die('Error: ' . mysql_error());
  }

mysql_close($db)
?>
<a href="yoink.php">Ty, click me to get back !</a>
</body>


-- INSERT PHP SLUT --



 <div id="postcontent">
    

 <?php include ('comment.php'); ?>

 </div>


</div>


</body>
</html>



-- COMMENT.PHP --



<style type="text/css">

<!--
#contentbox {
 height: 150px;
 width: 710px;
}
#contentbox #navn {
 height: 45px;
 width: 110px;
 float: left;
 margin-top: 10px;
 margin-right: 0px;
 margin-bottom: 0px;
 margin-left: 25px;
 font-family: Tahoma, Geneva, sans-serif;
 font-size: 20px;
 color: #666;
 text-decoration: underline;
 padding: 0px;
 clear: both;
}
.baggrundsbillede {
 height: 150px;
 width: 710px;
 background-image:url(billeder/commentbox.png);
 background-repeat:no-repeat;
 clear: both;
}
#contentbox #kommentaren {
 height: 87px;
 width: 440px;
 padding: 0px;
 float: right;
 margin-top: 10px;
 margin-right: 115px;
 margin-bottom: 25px;
 margin-left: 0px;
 font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
 font-size: 14px;
 color: #000;
}
.baggrundsbillede #contentbox #navn h1 {
 font-family: "Courier New", Courier, monospace;
 font-size: 22px;
 text-decoration: underline;
 padding: 0px;
 margin-top: 2px;
 margin-right: 0px;
 margin-bottom: 0px;
 margin-left: 0px;
}
-->

</style>
<?php
$db = mysql_connect ("localhost", "root", "");
mysql_select_db ("nactown", $db);


$resultatet = mysql_query ("SELECT * FROM kommentarer ORDER BY id DESC", $db);



 while ($kommentarer = mysql_fetch_array ($resultatet)) { 

?>
       <div class="baggrundsbillede">


<div id="contentbox">

 <div id="navn">
<h1>
    <?php echo $kommentarer ['navn'] ?>
</h1>
  </div>

  <div id="kommentaren">
  <?php echo $kommentarer ['kommentar'] ?>
  </div>
       

<?php
}          
?>
</div>       
                            
       </div>

Add a code snippet to your website: www.paste.org