XHTMLforum

XHTMLforum (http://xhtmlforum.de/index.php)
-   Serveradministration und serverseitige Scripte (http://xhtmlforum.de/forumdisplay.php?f=80)
-   -   Absendenproblem. (http://xhtmlforum.de/showthread.php?t=67576)

Eisstern 27.05.2012 00:59

Absendenproblem.
 
Bin dabei mein PHP zu intensivisieren. Habe nun folgendes Problem.
HTML-Code:

                        <div class="content">
                                <form action="seite2.php" method="post">
                                        Chat<br>
                                        <input type="text" name="msg">
                                        <br>
                                       
                                        Nachricht : <br>
                                        <form action="seite2.php" method="post">
                                        Deine E-Mail Adresse<br>
                                        <input type="text" name="email"><br>
                                       
                                        <textarea name="kommentar" cols="30" rows="5">
                                        </textarea>
                       
                                       
                                       
                       
                                        <h2>AdminLogIn</h2>
                                <form action="seite2.php" method="post">
               
                               
                                Loginname :  <input type="text" name="logname"><br>
                       
                                Passwort :&ensp;&ensp;<input type="password" name="password">
                                </form> <br>
                                <input type="submit" value="Absenden">
                        </div>

und


PHP-Code:

<?php
$ausgabe 
$_POST["msg"];


if(
$ausgabe == "Hi")
{
echo 
"Hey! Schön, dass du mich begrüßt :)";
}
elseif (
$ausgabe == "Hallo")
{
echo 
"Hallo! :) ";
}
else 
{
echo 
" Hm... du hast mich nicht begrüßt! Aber deine Ausgabe war \" $ausgabe \" ";
}
?><br><?php
$name 
$_POST["logname"];
$pw $_POST["password"];

if(
$name == "Admin" AND $pw == "1234")
{
echo 
" Willkommen Admin! "
}

$kommentar $_POST["kommentar"];
$email $_POST["email"];

if(
$name OR $email)
{
echo 
"Fülle bitte beide Felder aus!";
}


?>

Wieso tut sich nichts, wenn ich auf "Absenden" drücke?

threadi 27.05.2012 03:11

Weil der Absenden-Button sich außerhalb eines Formulars befindet.

Eisstern 27.05.2012 03:52

Ich bin doch soooo blöd. und swegen konnte ich nun 2 Stunden nicht fortfahren.. Oh mein Gott! Ich danke dir!


Alle Zeitangaben in WEZ +2. Es ist jetzt 06:54 Uhr.

Powered by vBulletin® Version 3.8.11 (Deutsch)
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

© Dirk H. 2003 - 2023