TomCat: einfach neue Seite fürs echo

Beitrag lesen

Hi,

also ich mache das immer so:

<html>
<head>
</head>
<body>

<?php
  if (!isset($sAction)) {
    ?>
    <form action="<?php $php_self ?>">
    <input type="hidden" name="sAction" value="DoEcho"><br>
    <input type="text" name="sEchoThis"><br>
    <input type="submit" value="Zeig her">
    <?
  }
  else {
    switch ($sAction) {
      case "DoEcho":
        echo DoEcho($sEchoThis);
        break;

default:
        echo "Sorry, Aktion unbekannt<br>";
        break;
    }
  }

function DoEcho($sEchoThis) {
    echo $sEchoThis;
  }
?>

</body>
</html>

Also so wie das Script da steht setzt der das echo "lol" einfach ans ende des Html Text . Er soll aber das echo "lol" auf eine neue Seite tun . Bin dankbar für jede Hilfe .

<html>

<head>
<title>Neue Seite 1</title>
</head>

<body>

<form method="POST" action="<?php $php_self ?>">
    <table border="0" width="1234">
    <tr>
      <td width="65">Name:</td>
      <td><input type="text" name="Name" size="20"></td>
    </tr>
    <tr>
      <td width="65">Passwort : </td>
      <td><input type="text" name="Passwort" size="20"></td>
    </tr>
  </table>
  <p><input type="submit" value="Abschicken" ></p>
</form>

</body>

</html>
<?php

if (isset($Name))
{
echo "lol";
}
?>