Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2011
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. <?
  2. $BudemeZobrazovat=true;
  3. if ($_POST["odeslano"])
  4. {
  5. if (strlen($_POST["vzkaz"])==0 || strlen($_POST["vzkaz"])>255)
  6. {
  7. echo "Vzkaz by měl mít mezi 1 - 255 znaků";
  8. }
  9. else
  10. {
  11. $BudemeZobrazovat=false;
  12. ?>
  13. <h1>Náhled vzkazu před uložením</h1>
  14. <div style="background : Silver;">
  15. <?echo nl2br($_POST["vzkaz"])?>
  16. </div>
  17. <form method="post" action="<?echo $_SERVER["PHP_SELF"]?>">
  18. <input type="hidden" name="vzkaz" value="<?echo $_POST["vzkaz"]?>">
  19. <input type="Submit" name="zpet" value="<< Zpět">
  20. </form>
  21. <form method="post" action="40_modify.php">
  22. <input type="hidden" name="vzkaz" value="<?echo $_POST["vzkaz"]?>">
  23. <input type="Submit" name="Uložit" value="Uložit >>">
  24. </form>
  25. <?
  26. }
  27. }
  28. if ($BudemeZobrazovat):?>
  29. <h1>Vložení vzkazu</h1>
  30. <form method="post" action="<?echo $_SERVER["PHP_SELF"]?>">
  31. Váš vzkaz:<br><textarea rows="6" name="vzkaz" cols="40"><?echo $_POST["vzkaz"]?></textarea><br>
  32. <input type="hidden" name="odeslano" value="true">
  33. <input type="Submit" name="odeslat" value=">> Náhled">
  34. </form>
  35.  
  36. <?endif;?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement