code

By skull, ago, written in Javascript.
URL http://pastecode.org/index.php/view/69078611
Download Paste or View RawExpand paste to full width of browser | Change Viewing Options
  1. <?php
  2.  if(!isset($_POST['Titel']) && !isset($_POST['Inhalt']))
  3.     {
  4. ?>
  5.  
  6.  
  7. <form action="Spoilerfunktion.php" method="post">
  8. Titel :<br>
  9. <input type="text" name="Titel">
  10. <br>
  11. <br>
  12. <br>
  13. Inhalt :<br>
  14. <textarea name="Inhalt" scroll="yes" rows="12" cols="70"></textarea>
  15. <br>
  16. <input type="submit" value="Senden" />
  17. </form>
  18.  
  19. <?php
  20. }else{
  21.  
  22.  
  23.     $titel = $_POST['Titel'];
  24.     $content = $_POST['Inhalt'];
  25.  
  26.  ?>
  27. <h1><?php echo $titel; ?></h1>
  28. <br>
  29. <a href="javascript:hideshow(adiv)">show/hide</a>
  30.  
  31. <script type="text/javascript">
  32.  
  33. function hideshow(which){
  34. if (!document.getElementById)
  35. return
  36. if (which.style.display=="block")
  37. which.style.display="none"
  38. else{
  39.  
  40. which.style.display="block"
  41. }}
  42. </script>
  43.  
  44. <div id="adiv" style="font:24px bold; display: none"><?php echo $content; ?></div>
  45. <?php } ?>

Here you can reply to the paste above

Make Private

   

Feeling clever? Set some advanced options.