Nieuw lid |
|
<?php
$maxlength = 10; //max chars wat je mag inrammen
?>
<form action="<?php echo $_SERVER['REQUEST_URI'];?>" method="post">
<input name="reactieVeldje" type="text" value="voer hier je zin in" maxlength="<?php echo $maxlength;?>" />
<input name="submit" type="submit" value="submit" />
</form>
<?php
if(isset($_POST['submit']))
{
if(strlen($_POST['reactieVeldje']) > $maxlength)
{
echo 'te veel chars spamz0rd';
}
else
{
$t = fopen('gastenboekje.txt', 'a+');
fwrite($t, $_POST['reactieVeldje']."\r\n"); //let op de \r\n ^^
fclose($t);
}
}
?>
<?php $maxlength = 10; //max chars wat je mag inrammen ?> <form action=" <?php echo $_SERVER['REQUEST_URI'];? >" method="post"> <input name="reactieVeldje" type="text" value="voer hier je zin in" maxlength=" <?php echo $maxlength;? >" /> <input name="submit" type="submit" value="submit" /> </form> <?php if(isset($_POST['submit'])) { if(strlen($_POST['reactieVeldje']) > $maxlength) { echo 'te veel chars spamz0rd'; } else { $t = fopen('gastenboekje.txt', 'a+'); fwrite($t, $_POST['reactieVeldje']."\r\n"); //let op de \r\n ^^ } } ?>
Je kan de reacties op je site tonen dmv:
include("gastenboekje.txt");
include("gastenboekje.txt");
|