eintrag in db...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • eintrag in db...

    hmm wenn ich das so mache:
    PHP Code:
    <?
    include('config.inc.php');
    $conection = mysql_connect ($host,$usr,$pw);
    mysql_select_db($db,$conection);
    $SQLstring = ( "INSERT INTO `fw` (name , ergebnis) VALUES ('$gegner','$spielstand')") or die (mysql_error());
    if ($SQLstring) {
    echo "<font class=news3>Ergebniss erfolgreich eingeragen!</font>";
     }else{ "<font class=news3>Srry, aber er hat anscheind ein problem gegeben.<br> Der eintrag wurde nicht vorgenommen!<br> Versuch es später nochmal.";
    }
    MYSQL_CLOSE();
    ?>
    formular lautet:

    <form action=fwpost01.php method=post>
    <table border=0>
    <tr>
    <td>Gegner</td>
    <td><input type=text name=gegner></td>
    </tr>
    <tr>
    <td>Spielstand</td>
    <td><input type=text name=spielstand></td>
    </tr>
    <tr>
    <td><input type=submit value=Eintragen></td>
    </tr>
    </table>

    er schreibt hin das es eingetragen wurde aber er schreibts net rein!

    tabelle lautet:
    name
    ergebnis
    id

    bin echt verzweifelt!

  • #2
    Re: eintrag in db...

    Original geschrieben von Lord-Napoleon
    hmm wenn ich das so mache:
    PHP Code:
    <?
    $SQLstring = ( "INSERT INTO `fw` (name , ergebnis) VALUES ('$gegner','$spielstand')") or die (mysql_error());
    ?>
    Mach ich nie
    PHP Code:
    mysql_query "INSERT INTO `fw` (name , ergebnis) VALUES ('$gegner','$spielstand')") or die (mysql_error()); 
    Probier mal...

    PHP
    MySQL
    Jetzt klicken & reich werden

    Comment


    • #3
      ups ich trottel ^^ thx für deine schnelle hilfe hab da wohl was verwechselt
      Last edited by Lord-Napoleon; 21-09-2003, 16:15.

      Comment

      Working...
      X