code

Go BackChange Paste Viewing Options
<?php
 if(!isset($_POST['Titel']) && !isset($_POST['Inhalt']))
    {
?>


<form action="Spoilerfunktion.php" method="post">
Titel :<br>
<input type="text" name="Titel">
<br>
<br>
<br>
Inhalt :<br>
<textarea name="Inhalt" scroll="yes" rows="12" cols="70"></textarea>
<br>
<input type="submit" value="Senden" />
</form>

<?php
}else{


    $titel = $_POST['Titel'];
    $content = $_POST['Inhalt'];

 ?>
<h1><?php echo $titel; ?></h1>
<br>
<a href="javascript:hideshow(adiv)">show/hide</a>

<script type="text/javascript">

function hideshow(which){
if (!document.getElementById)
return
if (which.style.display=="block")
which.style.display="none"
else{

which.style.display="block"
}}
</script>

<div id="adiv" style="font:24px bold; display: none"><?php echo $content; ?></div>
<?php } ?>			
Go Back