HelloApu
Legacy Member
Hallo, dit is mijn code
en dit is de pagina: www.gwek.be/PHPVG/topix01/test.php?topixid=1
En ik weet niet waarom ik die errors krijg
, ik denk dat het is dat het die topixid niet doorgeeft maar zoals ik dat zie doet dat het wel 
PHP:
<?php
include("connect.php");
if( $_GET['pag'] == "1" )
{
/* date veranderen */
/* IP code toevoegen */
$tijd['1'] = time() - 120;
$query['1'] = mysql_query("SELECT time,ip FROM topix". $_GET['topixid'] ." WHERE time > '".$tijd['1']."' AND ip = '".$clientip."'");
if ( mysql_num_rows($query['1']) == 0 )
{
/* Replacement strings invullen */
$naam = str_replace('>','', $_POST['bericht']);
$naam = str_replace('<','', $naam );
$naam = str_replace('&','', $naam );
$naam = str_replace('\"','', $naam );
$naam = str_replace('\'','', $naam );
$email = str_replace('>','', $_POST['bericht']);
$email = str_replace('<','', $email );
$email = str_replace('&','', $email );
$email = str_replace('\"','', $email );
$email = str_replace('\'','', $email );
$bericht = str_replace('>','', $_POST['bericht']);
$bericht = str_replace('<','', $bericht );
$bericht = str_replace('&','', $bericht );
$bericht = str_replace('\"','', $bericht );
$bericht = str_replace('\'','', $bericht );
$bericht = str_replace('[kleur=rood]','<font color=\"#FF0000\">', $bericht );
$bericht = str_replace('[/kleur]','</font>', $bericht );
$bericht = str_replace('[kleur=groen]','<font color=\"#00FF00\">', $bericht );
$bericht = str_replace('[/kleur]','</font>', $bericht );
$bericht = str_replace('[kleur=blauw]','<font color=\"#0000FF\">', $bericht );
$bericht = str_replace('[/kleur]','</font>', $bericht );
$bericht = str_replace('[kleur=wit]','<font color=\"#FFFFFF\">', $bericht );
$bericht = str_replace('[/kleur]','</font>', $bericht );
$bericht = str_replace('[kleur=zwart]','<font color=\"#000000\">', $bericht );
$bericht = str_replace('[/kleur]','</font>', $bericht );
$bericht = str_replace('[kleur=grijs]','<font color=\"#CCCCCC\">', $bericht );
$bericht = str_replace('[/kleur]','</font>', $bericht );
$bericht = str_replace('[kleur=oranje]','<font color=\"#999900\">', $bericht );
$bericht = str_replace('[/kleur]','</font>', $bericht );
$bericht = str_replace('[vet]','<b>', $bericht );
$bericht = str_replace('[/vet]','</b>', $bericht );
$bericht = str_replace('[schuin]','<i>', $bericht );
$bericht = str_replace('[/schuin]','</i>', $bericht );
$bericht = nl2br($bericht);
mysql_query("INSERT INTO topix".$_GET['topixid']." ( time,id,naam,tijd,email,bericht,ip ) VALUES ( '". time() ."','".$id."','".$naam ."','".date("H:s d/m/y")."','".$email."','".$bericht ."','". $clientip ."') ");
}
else
{
echo "U kan maar om de 2 minuten een bericht plaatsen.";
}
$_POST['pag'] = 0;
}
?>
<!-- Pagina -->
<!-- / pagina / -->
<!-- Berichtjes -->
<?PHP
$query['2'] = mysql_query("SELECT time,id,naam,tijd,email,bericht FROM topix".$_GET['topixid']." ORDER BY time");
while( $resultaat['2'] = mysql_fetch_array($query['2']) )
{
echo "tablestructuur";
}
echo "
<form action=\"test.php?pag=1&topixid=".$topixid."\">
<table border=\"0\">
<tr>
<td>
<b>Naam*:</b>
</td>
<td>
<input type=\"text\" name=\"naam\">
</td>
</tr>
<tr>
<td>
<b>E-mail:</b>
</td>
<td>
<input type=\"text\" name=\"email\">
</td>
</tr>
<tr>
<td colspan=\"2\">
<b>Bericht*:</b>
</td>
</tr>
<tr>
<td colspan=\"2\">
<textarea name=\"bericht\" rows=\"5\" cols=\"50\"></textarea>
</td>
</tr>
<tr>
<td colspan=\"2\">
<input type=\"submit\" value=\"post\">
<input type=\"hidden\" name=\"pag\" value=\"1\">
</td>
</tr>
</table>
";
?>
<!-- / berichtjes / -->
<!-- pagina -->
<!-- / pagina / -->
En ik weet niet waarom ik die errors krijg
, ik denk dat het is dat het die topixid niet doorgeeft maar zoals ik dat zie doet dat het wel 
.