Jump to content

C4mpt3R?

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Posts posted by C4mpt3R?

  1. you also could do it like this:

    for this you have to add a row called \"ID\" --> primary key

    <?php

    $db=mysql_connect(\'localhost\',\'DBuser\',\'DBpassword\' );

    $db or die(\'DataBase Error\');

    mysql_select_db(\'DataBase\',$db) or die(\'DataBase Error\');

     

    $sql=\"SELECT * FROM news ORDER BY ID\";

    $result=mysql_query($sql,$db);

    if ($result)

    {

    while($row = mysql_fetch_array($result))

    {

    echo \" <table border=\'0\'><tr>

    <td> \".$row[\"user\"].\"</td>

    <td> \".$row[\"article\"].\" </td>

    <td> \".$row[\"text\"].\" </td></tr>

    </table>\";

    }

    }

     

    mysql_close($db);

     

    ?>

     

     

    hope it will work like this too

    yours C4mpt3R?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.