Hilfe für mein Problem

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

  • Hilfe für mein Problem

    Habe große Probleme mit PHP und mysql

    ich will daten aus der Datenbank auslesen und dann in einer Tabelle anzeigen.

    Mit phpmyadmin wird angezeigt, dass Daten in der Datenbank sind

    Kann mir da jemand schnell helfen ?
    Danke
    PHP Code:
    <?php
    session_start
    ();

    if(!
    session_is_registered('user') || $_SESSION['user'] == "") {
        
    header("location:index.php");
        die;
    }
    include(
    "connect.inc.php");
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
        <title>Tätigkeitsnachweis</title>
    <link rel="stylesheet" type="text/css" href="style.css">
    </head>
    <body>
    <p align="center">&nbsp;</p>
    <table width="600" bgcolor="#000000" border="0" cellpadding="5" cellspacing="1" align="center">
        <tr>
            <td width="30" bgcolor="#e7e7e7"><div align="center">ID</div></td>
            <td width="50" bgcolor="#e7e7e7"><div align="center">Datum</div></td>
            <td width="40" bgcolor="#e7e7e7"><div align="center">Projektnr.</div></td>
            <td width="300" bgcolor="#e7e7e7">Tätigkeit</td>
            <td width="40" bgcolor="#e7e7e7"><div align="center">von</div></td>
            <td width="40" bgcolor="#e7e7e7"><div align="center">bis</div></td>
            <td width="40" bgcolor="#e7e7e7"><div align="center">Pause</div></td>
        </tr>
      <?php
        $workquery 
    = @mysql_query("SELECT * FROM work WHERE name= '".$_POST['name']."'") or print('Kann die Projekte nicht ausw&auml;hlen!');
        
    $counter 1;
            while(
    $line = @mysql_fetch_object($workquery)) {
            echo 
    '<tr>';
            echo 
    '<td width="30" bgcolor="#e7e7e7" align="right">'.$counter.'</td>';
            echo 
    '<td width="50" bgcolor="#ffffff">'.$line->datum.'</td>';
            echo 
    '<td width="40" bgcolor="#ffffff">'.$line->projeknr'</td>';
            echo 
    '<td width="300" bgcolor="#ffffff">'.$line->taetigkeit.'</td>';
            echo 
    '<td width="40" bgcolor="#ffffff">'.$line->von.'</td>';
            echo 
    '<td width="40" bgcolor="#ffffff">'.$line->bis.'</td>';
            echo 
    '<td width="40" bgcolor="#ffffff">'.$line->pause.'</td>';
            echo 
    '</td>';
            echo 
    '</tr>';
            
    $counter++;
        }
        
    ?></form>
    </table>
    </body>
    </html>
    EDIT:
    PHP-Tags gesetzt. wotan
    Last edited by Wotan; 22-05-2003, 14:41.

  • #2
    test mal bei fetch objekt mit dem or print bzw. or die ob das geht, oder nimm einfach mysql_fetch_array()
    und ruf das über nen array auf, das geht auf jedenfall.
    Sunshine CMS
    BannerAdManagement
    Borlabs - because we make IT easier
    Formulargenerator [color=red]Neu![/color]
    Herkunftsstatistik [color=red]Neu![/color]

    Comment

    Working...
    X