Problme mit MySQL+PHP Formular

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

  • Problme mit MySQL+PHP Formular

    Hi, ich habe das Problem das ich über ein Formular werte in eine MySQL 5.0 Datenbank übertragen möchte. Das macht er aber nicht. Könnt Ihr mir Helfen.

    Code des Formular
    PHP Code:

    <!doctype html public "-//W3C//DTD HTML 4.0 //EN"
    <
    html>
    <
    head>
           <
    title>Title here!</title>
    </
    head>
    <
    body>

    <
    form method='GET' action='bearbeiten.php'>
    <
    table border="1" width="100%" id="table1">
        <
    tr>
            <
    td>
            <
    table border="1" width="50">
                <
    tr>
                    <
    td width="50">Name:</td>
                    <
    td><input type='text' name='postname' maxlength='100' size='30'></td>
                </
    tr>
                <
    tr>
                    <
    td>Status:</td>
                    <
    td><input type='text' name='poststatus' maxlength='40' size='30'></td>
                </
    tr>
                <
    tr>
                    <
    td>&nbsp;</td>
                    <
    td><input type='submit' name='postspeichern' value='Anlegen'></td>
                </
    tr>
            </
    table>
            </
    td>
        </
    tr>
    </
    table>
    </
    form>
    </
    body>
    </
    html

    Code des PHP-Doks:

    PHP Code:
    <html>
    <head>
           <title>Title here!</title>
    </head>
    <body>
    <?php

    $verbindung 
    mysql_connect("srv2003pdc:3309""root","pass");
    mysql_select_db("mitarbeiterstatus");

    $tbname $_GET['postname'];
    $tbstatus $_GET['poststatus'];

    mysql_query("INSERT INTO
                         mbstatus
                         (name,status)
                         VALUES(
                         
    $tbname,
                         
    $tbstatus)
                         "
    );

    echo
    "<table width='300'>
      <tr>
        <td align='center' colspan='3'>- Mitarbeiter ERZEUGT - <br>
          Der Mitarbeiter 
    $tbname wurde erzeugt.<br>
         </td>
      </tr>
    </table>"
    ;

    include(
    "ausgabe.php");

    ?>
    </body>
    </html>
    HILFEEEE !!!
    Last edited by Hy3per; 28-04-2006, 11:36.

  • #2
    Re: Problme mit MySQL+PHP Formular

    http://www.php-resource.de/forum/sho...threadid=50454
    I don't believe in rebirth. Actually, I never did in my whole lives.

    Comment


    • #3
      Hi, hab alles mal gemacht wie es im Link beschrieben ist. Also als erstes hatte ich einen kleine Tipfehler im Script. Nachdem ich das geändert hab bekomme ich jetzt:

      Unknown column 'HEI' in 'field list'
      --------------------------------------------------------------------------------
      $result = mysql_query("INSERT INTO mbstatus (name,status) VALUES( $tbname, $tbstatus) ")
      --------------------------------------------------------------------------------

      Ich möchte aus einem Formular mit zwei Eingabe Feldern die Eingebenen Werte in eine MySQL Datenbank eintragen. "HEI" ist das küzel für einen Mitarbeiter von uns.


      DANKE HAB ALLE FEHLER BEHEBEN KÖNNEN. VIELEN DANK

      Comment

      Working...
      X