XaraX: form action="...?var" && method="get"

Beitrag lesen

Guten Morgen,

<?php

function login(){
print "Login<br>

<form method="get" action="index.php">

<table cellspacing="0" cellpadding="0">
     <tr>
    <td><input type="hidden" name="action" value="show">User</td>
    <td><input type="text" name="username"></td>
     </tr>
     <tr>
    <td>Passwort </td>
    <td><input type="password" name="password"></td>
     </tr>
     <tr>
    <td> </td>
    <td><input type="submit" value="Weiter"></td>
     </tr>
   </table>
  </form>";
}

if (($_GET[username] == "") and ($_GET[password] == "")){
print login();

include "stuff24_cc/config.php";

}

elseif($_GET[username]!='' && $_GET[password]!='') include('site=stuff24_cc/admin.php');

...usw.

Da Variablen von Formularen in der Methode GET an die Ziel-URI angehängt werden, kommte es automatisch zum Konflikt.
Solltest Du dennoch so verfahren wollen, verwende stattdessen als Methode POST.

Gruß aus Berlin!
eddi