Probleempje met script

Pagina: 1
Acties:
  • 27 views sinds 30-01-2008

  • flexje
  • Registratie: September 2001
  • Laatst online: 12:10

flexje

got-father

Topicstarter
hey peeps , ik heb een probleempje met het volgende script! hij laat helemaal niks zien...

<html>
<head>
<title>t0pic</title>
</head>
<body>

<?php
echo "<!-- Topic en php par Lama (magnier@ifrance.com) -->";
if ( $text )
{
// The user change the topic
// We put the info in a string
$text = strip_tags("$text");
$login = strip_tags("$login");
$topic = "\"<I>$text</I>\" $login";
$topic = stripslashes("$topic");

// We save the topic
$fileopen = fopen("topic.txt","w+");
fputs($fileopen,"$topic");
fclose($fileopen);

// We add some informations for history
$date = date("d-F-Y H:i");
$top = "<B>$date</B> : $topic\n";

// We read the history and we add the new topic
if ( file_exists("topichistory.txt") )
{
$fileopen = fopen("topichistory.txt","r");
$topadd = "";
$i = 0;

// Read the old topics (100)
while ( !feof($fileopen) && $i<100 )
{
if ( $topadd!="" ) $top.="";
$topadd = fgets($fileopen,4096);
$top.= "$topadd";
$i++;
}
$news = stripslashes("$top");
fclose($fileopen);
}

// We save history
$fileopen = fopen("topichistory.txt","w+");
fputs($fileopen,"$top");
fclose($fileopen);

// We confirm the change for the user
echo "The new topic is change :<BR>\n";
echo $topic;
}
else
}
}
?>

<FORM action="t0pic3.php" method=POST>
<CENTER>
<TABLE>
<TR>
<TD align=left>Text</TD>
<TD align=left><INPUT type=\"text\" name=\"text\" size=50 maxlenght=200 value=\"Write your text\"></TD>
</TR>
<TR>
<TD align=left>Your name</TD>
<TD align=left><INPUT type=\"text\" name=\"login\" size=32 maxlenght=32></TD>
</TR>
<TR>
<TD align=right colspan=2><INPUT type=\"submit\" value=\"Change Topic\"></TD>
</TR>
</TABLE>
</CENTER>
</FORM>


</body>
</html>

"Try not to become a man of success but rather to become a man of value..."


  • D2k
  • Registratie: Januari 2001
  • Laatst online: 31-08 10:19

D2k

dan moet je hem ff debuggen
suc6

Doet iets met Cloud (MS/IBM)


  • Tom
  • Registratie: Juni 1999
  • Niet online

Tom

Afbeeldingslocatie: http://www.fi.uu.nl/ict2001/materialen/hans_klein/Image53.gif

Dit topic is gesloten.