Beste Jeroen, ik heb het ondertussen even opgezocht dus hier komtie.
Het leek me interessant als dit hier ook zou staan vandaar.
[syntax="php"]<html>
<head>
<title>Pagina titel</title>
<link rel="stylesheet" type="text/css" href="http://site.polyfemme.be/virtual/css/popup.css" />
</head>
<body>
<div id="reactie">
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table1">
<tr>
<td width="10">
<img border="0" src="http://polyfemme.be/data/images/tbl_left_top.gif"></td>
<td background="http://polyfemme.be/data/images/tbl_top.gif">
<img border="0" src="http://polyfemme.be/data/images/tbl_top.gif"></td>
<td width="10">
<img border="0" src="http://polyfemme.be/data/images/tbl_right_top.gif"></td>
</tr>
<tr>
<td width="10" background="http://polyfemme.be/data/images/tbl_left.gif">
<img border="0" src="http://polyfemme.be/data/images/tbl_left.gif"></td>
<td style="margin: 2">
<h4>Reacties</h4>
</td>
<td height="20" width="10" background="http://polyfemme.be/data/images/tbl_right.gif">
<img border="0" src="http://polyfemme.be/data/images/tbl_right.gif"></td>
</tr>
<tr>
<td width="10">
<img border="0" src="http://polyfemme.be/data/images/tbl_left_bottom.gif"></td>
<td background="http://polyfemme.be/data/images/tbl_bottom.gif">
<img border="0" src="http://polyfemme.be/data/images/tbl_bottom.gif"></td>
<td width="10">
<img border="0" src="http://polyfemme.be/data/images/tbl_right_bottom.gif"></td>
</tr>
</table>
<?
// set all needed variables to connect with MySQL database
$user = "gebruikersnaam";
$pass = "paswoord";
$host = "localhost";
$dbdb = "database";
// connect to MySQL database
if (!mysql_select_db($dbdb, mysql_connect($host, $user, $pass)))
// give error message if the connection could not be established
echo "Sorry, de database kan niet geopend worden.";
// unset all variables
unset($user);
unset($pass);
unset($host);
unset($dbdb);
$table = "reacties";
//-- insert reaction to database
if ($at && ($door && $msg))
{
$sql3 = "insert into $table (id, door, website, msg, at, tid, ip, fid) VALUES ('', '$door', '$website', '$msg', '$at', '$id', '$REMOTE_ADDR', '$fid')";
$res3 = mysql_query($sql3);
if ($res3)
{
if ($fid)
$insert = "<p><span class=here>Bedankt voor het reageren!</span></p>";
else
$insert = "<p><span class=here>Bedankt voor het reageren $door!</span></p>";
}
else
{
$insert = "<p><span class=here>Sorry, je reactie is niet opgeslagen, probeer het opnieuw of neem contact met ons op.</span></p>";
}
$fid = "";
$door = "";
$email = "";
$msg = "";
}
//-- not enough data
elseif ($at)
{
$insert = "<p><span class=kopje>Je bent je naam of bericht vergeten.</span></p>";
}
//-- recieve reacties from database
$sql2 = "select * from $table where tid = $id order by id";
$res2 = mysql_query($sql2);
echo "";
echo "";
echo "";
echo "";
echo "$insert";
//-- show reactions
if (mysql_num_rows($res2) >= 1)
{
while ($row2 = mysql_fetch_array($res2))
{
if ($row2[fid])
{
$fsql = "SELECT id, name FROM $table WHERE id = $row2[fid]";
$fres = mysql_query($fsql);
$frow = mysql_fetch_array($fres);
}
$row2[door] = htmlentities($row2[door]);
$row2[website] = htmlentities($row2[website]);
$row2[msg] = htmlentities($row2[msg]);
$row2[msg] = nl2br($row2[msg]);
if ($row2[email])
echo "<BR><b>Reactie door <a href=\"$row2[website]\" title=\"Website: $row2[website]\" target=\"_blank\">$row2[door]</a> @ $row2[at]</b><br>\n";
else
echo "<BR><b>Gepost door <a href=\"$row2[website]\" title=\"Website: $row2[website]\" target=\"_blank\">$row2[door]</a> @ $row2[at]</b><br>\n";
echo "$row2[msg]<P>";
$row2[door] = "";
$row2[email] = "";
$row2[msg] = "";
$frow[id] = "";
$frow[name] = "";
}
}
else
{
echo "<BR><b>Er zijn nog geen reacties op deze post.</b><BR><BR>";
}
echo "<hr>";
echo "<p>";
// door email at tid
$at = date("d-m-Y");
//echo "<center>";
echo "<form method=post name=invulform action=$PHP_SELF>";
echo "<input type=hidden name=id value=\"$id\">";
echo "<input type=hidden name=at value=\"$at\">";
echo "<b>Naam</b><br>";
echo "<input type=text name=door value=\"$door\" size=25><BR><BR>";
echo "<b>Jouw website</b> (inclusief http://)<br>";
echo "<input type=text name=website value=\"$website\" size=25><BR><BR>";
echo "<b>Reactie</b><br>";
echo "<textarea name=msg cols=80 rows=6>$msg</textarea><BR><BR>";
echo "<input type=submit name=submit value=\"Reageer\">";
echo "</form>";
//echo "</center>";
echo "</p>";
echo "<hr>";
?>
</div>
</body>
</html>
[/syntax]
Ik zal zien of ik nog een versie kan posten waar de polyfemme layout uit gesloopt is. Tot dan moet je het met dit doen. Maar het werkt ook hoor.