Hallo,
ik was ff voor een site een shoutbox aan het maken.
totdat ik op een fout opbotste.
en ik kom er niet uit.
kunne jullie muh helpen?
hier het script:
***********
* lastm.txt * } Gechmod naar 777
***********

***************
* end lastm.txt *
***************
**********
* shout.txt * } Gechmod naar 777
**********


**************
* end shout.txt *
**************
***********
* index.php *
***********

<?php
<marquee>
include 'lastm.txt';
</marquee>
<br>
<a href="#" onclick="window.open('add.php')">Voeg een bericht toe!</a>
<br>
include 'shout.txt';
<br>
<a href="#" onclick="window.open('add.php')">Voeg een bericht toe!</a>
?>

***************
* end index.php *
***************

**********
* add.php *
**********

<?php
if (!$_POST['submit'])
{
echo "<form action=index.php method=post>Bericht: <input type=text name=btext><input type=submit name=submit value='Zend'></form><a href='javascript:history.back()'>Terug</a>";
}
else
{
$file = fopen ("lastm.txt","w");
fputs ($file,$_POST['btext']);
$lastf = fopen ("shout.txt","a");
fputs ($lastf,"$_POST['btext'] <br>");
echo "Bericht verzonden!";
}
?>

*************
* end add.php *
*************

Ik hoop dat jullie me kunnen helpen.
Greetz,
baed
<?php
<marquee>
include 'lastm.txt';
</marquee>
<br>
<a href="#" onclick="window.open('add.php')">Voeg een bericht toe!</a>
<br>
include 'shout.txt';
<br>
<a href="#" onclick="window.open('add.php')">Voeg een bericht toe!</a>
?>
Je mag niet zomaar html in je php-gebeuren flickeren...


<marquee>
<?php include 'lastm.txt'; ?>
</marquee>
<br>
<a href="#" onclick="window.open('add.php')">Voeg een bericht toe!</a>
<br>
<?php include 'shout.txt'; ?>
<br>
<a href="#" onclick="window.open('add.php')">Voeg een bericht toe!</a>
je kan wel html in het gehuegen flickeren maar dat is niet slim dan kan je het zo hacken en deleten
Ik bedoel tussen <?php /*en*/ ?>, want dat wordt door php gezien als een opdracht, maar die snapt hij niet.
oke add.php is nu ook goed.
maar als ik een bericht wil plaatsen dan wil hij niet :S
probeer maar:
Shout

Reageren