Hi guys.
Cool forum :-)
I'm sort of new, but hope you can help me.
From the code I have two questions:
<form action"gbog.php" method="post">
<input name="navn" type="text">
<input name="tag" type="text">
<input type="Submit" value="Check your email">
</form>
<?php
if($POST["navn"] && $POST["tag"]) {
$str = "Name: $navn \r\r Tag: $tag<br>";
$file = "gbog.txt";
$fp = fopen($file, "r");
$txt = file($file);
$res = implode( "", $txt);
$res = "$str$res";
fclose($fp);
$fp = fopen($file,"w");
fputs($fp, $res);
fclose($fp);
}
// her udskrives hvad der er i gbog.txt
$filename="gbog.txt";
$message=file($filename);
$message = implode("\n",$message);
$txt = "$message";
echo "$txt";
?>
1: How do I set up an admin-password, so you have to type like "manly" before it allows you to post?
2: Whenever it writes to the txt-file, and I use ' or special characters in a word, it always puts an \ in front of it.. how do I fix this?
Thanks!