join us in einer datei?

vodka

Mitglied
Hallo ich hab hierso ein join us formular!Und ich will das die zweit datein also join.php und joinus.php in eier datei sind aber es geht ned weil wen ich drauf klicke immer verschickt obwohl ich noch garnichts eingeben konnte!Hier mal code von join.php

join.php
PHP:
<?php
// Betreff und Email //
mail("$email","Neuer Member!",

// Felder //
"Name: $name \n
Nickname: $nickname \n
Email: $mail \n
Icq: $icq \n
Homepage: $page \n
Comment: $kommentar \n",

// Von //
"From: Member");

echo "Die daten wurden erfolgreich gesendet!<p>Sie werden in 1-2 Tagen bearbeitet!<p>Jetzt werden sie Weitergeleitet!";
echo "<meta http-equiv='refresh' content='5; URL=$url'>";
?>

und hier joinus.php
PHP:
<b><br>
Join us</b><br>
<br> 
<form name="form1" method="post" action="join.php">
  <table width="41%" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td width="32%" height="29"><b><font color="#000000" size="2">Name:</font></b></td>
      <td width="68%" height="29"> <font size="2" color="#000000"><b> 
        <input type="text" name="name">
        </b></font></td>
    </tr>
    <tr> 
      <td width="32%" height="30"><b><font color="#000000" size="2">Nickname: 
        </font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <input type="text" name="nickname">
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%" height="29"><b><font size="2" color="#000000">Email:</font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <input type="text" name="mail">
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%" height="28"><b><font color="#000000" size="2">Icq:</font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <input type="text" name="icq">
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%"><b><font size="2" color="#000000">Homepage:</font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <input type="text" name="page">
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%"><b><font size="2" color="#000000">Comment:</font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <textarea name="kommentar" cols="30" rows="3" wrap="PHYSICAL">Hier koennt ihr euer 
Kommentar schreiben 
z.b. warum ihr in den clan wollt etc..!</textarea>
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%"><b> <font color="FFC760"> 
        <input type="reset" name="Abschicken2" value="Zur&uuml;cksetzen">
        </font></b></td>
      <td width="68%" height="29"><b><font color="FFC760" size="2"> 
        <input type="submit" name="Abschicken" value="Senden">
        </font></b></td>
    </tr>
  </table>

und ich will jetzt das es so ist

joinus.php

PHP:
<b><br>
Join us</b><br>
<br> 
<form name="form1" method="post" action="<? $php_self ?>">
  <table width="41%" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td width="32%" height="29"><b><font color="#000000" size="2">Name:</font></b></td>
      <td width="68%" height="29"> <font size="2" color="#000000"><b> 
        <input type="text" name="name">
        </b></font></td>
    </tr>
    <tr> 
      <td width="32%" height="30"><b><font color="#000000" size="2">Nickname: 
        </font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <input type="text" name="nickname">
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%" height="29"><b><font size="2" color="#000000">Email:</font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <input type="text" name="mail">
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%" height="28"><b><font color="#000000" size="2">Icq:</font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <input type="text" name="icq">
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%"><b><font size="2" color="#000000">Homepage:</font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <input type="text" name="page">
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%"><b><font size="2" color="#000000">Comment:</font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <textarea name="kommentar" cols="30" rows="3" wrap="PHYSICAL">Hier koennt ihr euer 
Kommentar schreiben 
z.b. warum ihr in den clan wollt etc..!</textarea>
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%"><b> <font color="FFC760"> 
        <input type="reset" name="Abschicken2" value="Zur&uuml;cksetzen">
        </font></b></td>
      <td width="68%" height="29"><b><font color="FFC760" size="2"> 
        <input type="submit" name="Abschicken" value="Senden">
        </font></b></td>
    </tr>
  </table>
<?php
// Betreff und Email //
mail("$email","Neuer Member!",

// Felder //
"Name: $name \n
Nickname: $nickname \n
Email: $mail \n
Icq: $icq \n
Homepage: $page \n
Comment: $kommentar \n",

// Von //
"From: Member");

echo "Die daten wurden erfolgreich gesendet!<p>Sie werden in 1-2 Tagen bearbeitet!<p>Jetzt werden sie Weitergeleitet!";
echo "<meta http-equiv='refresh' content='5; URL=$url'>";
?>

aber jetzt verschickt sich automatisch wen ich auf joinus.php klicke und kann ned mal eingabe felder ausfuelen!Was muss ich machen das man auf den Button klicken muss und das es dan verschickt und dan der Text kommt

"Die daten wurden gesendet Sie werden un 1-2 Tagen bearbeitet!Jetzt werden sie Weitergeleiten!"
 
Du musst deinem Versandskript ein Stichwort geben, nachdem es erst startet. Das einfachste wär eine Prüfungsvariable mitzuschicken:
PHP:
<?php
  if(!isset($send) && $send) {
    // Betreff und Email //
    mail("$email","Neuer Member!",
    // Felder //
    "Name: $name \n
Nickname: $nickname \n
Email: $mail \n
Icq: $icq \n
Homepage: $page \n
Comment: $kommentar \n",
    // Von //
    "From: Member");
    echo "Die daten wurden erfolgreich gesendet!<p>Sie werden in 1-2 Tagen bearbeitet!<p>Jetzt werden sie Weitergeleitet!";
    echo "<meta http-equiv='refresh' content='5; URL=$url'>";
  } else {
?>
<b><br>
Join us</b><br>
<br>
<form name="form1" method="post" action="<? $php_self ?>">
  <input type="hidden" name="send" value="true">
  <table width="41%" border="0" cellspacing="0" cellpadding="0">
[...]
  </table>
</form>
<?php
  }
?>
 
hambs mal getestet geht aber irgentwie ned!

schau fightus.php:

PHP:
<?php
if(!isset($send) && $send)
{
include("config.php");
mail("$email",
"Neuer Fight!",
"Clanname: $clanname \n
Art: $art \n
XonX: $xonx \n
Maps: $maps \n
Datum: $datum \n
Zeit: $zeit \n
Warorga: $warorga \n
Email: $mail \n
Icq: $icq \n
Comment: $kommentar \n","From: Fight");

echo "Die daten wurden erfolgreich gesendet!<p>Sie werden in 1-2 Tagen bearbeitet!<p>Jetzt werden sie Weitergeleitet!";
echo "<meta http-equiv='refresh' content='5; URL=$url'>";
}
    else
{
?> 
<form name="form1" method="post" action="<? $php_self ?>">
  <table width="41%" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td width="32%" height="29"><b><font color="#000000" size="2">Clanname:</font></b></td>
      <td width="68%" height="29"> <font size="2" color="#000000"><b> 
        <input type="text" name="clanname">
        </b></font></td>
    </tr>
    <tr> 
      <td width="32%" height="30"><b><font color="#000000" size="2">Art: </font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <select name="art">
          <option selected>Clanwar</option>
          <option>Friendlywar</option>
          <option>Trainwar</option>
        </select>
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%" height="29"><b><font color="#000000" size="2">XonX:</font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <select name="xonx">
          <option selected>1on1</option>
          <option>2on2</option>
          <option>3on3</option>
          <option>4on4</option>
          <option>5on5</option>
          <option>6on6</option>
        </select>
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%" height="28"><b><font color="#000000" size="2">Map's:</font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <input type="text" name="maps">
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%"><b><font color="#000000" size="2">Datum:</font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <input type="text" value="XX.XX.XXXX" size="15" name="datum">
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%"><b><font color="#000000" size="2">Zeit:</font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <input type="text" value="XX:XX Uhr" size="15" name="zeit">
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%"><b><font color="#000000" size="2">Warorga:</font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <input type="text" name="warorga">
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%"><b><font color="#000000" size="2">Email:</font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <input type="text" name="mail">
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%"><b><font color="#000000" size="2">Icq:</font></b></td>
      <td width="68%" height="29"><b><font color="#000000" size="2"> 
        <input type="text" name="icq">
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%"><b><font color="#000000" size="2">Comment:</font></b></td>
      <td width="68%" height="29"><b><font size="2" color="#000000"> 
        <textarea name="kommentar" cols="20" rows="2"></textarea>
        </font></b></td>
    </tr>
    <tr> 
      <td width="32%"> <font color="FFC760"> 
        <input type="reset" name="Abschicken2" value="Zur&uuml;cksetzen">
        </font></td>
      <td width="68%" height="29"> <font color="FFC760"> 
        <input type="submit" name="Abschicken" value="Senden">
        </font></td>
    </tr>
  </table>
  <input type="hidden" name="send" value="true">
</form>
<?php
}
?>
 
Zuletzt bearbeitet:
Verstanden?

Noch etwas, ersetz bitte [color="2c2c9c"]$send[/color] durch [color="2c2c9c"]$_POST['send'][/color].
 
Zurück