Results 1 to 3 of 3

Thread: Help in Php?

  1. #1
    pakilala is offline Junior Member
    Last Online
    3rd July 2011 @ 03:03 PM
    Join Date
    16 Jan 2006
    Posts
    16
    Threads
    8
    Credits
    0
    Thanked
    0

    Default Help in Php?

    bhut hi acha forum hy.
    mara ak masala hy vo yeh k mera database mysql ma hy js ka nam "dw" hy awr table ka nam "tmo" hy. is a 2 field hy ak ka nam "id" awr dosray ka nam "amount" hy. my ny informmation to php page par display to kar di par ma chata ho ka ka display page ma "amount" field k sath ak coloum "S.No" ka bi ho jis ma numbers ascending order ma display ho. ar agar user delete karna chay to vo khud ba khud ascending order ma ay.

    thanks

  2. #2
    ahmedameer is offline Senior Member+
    Last Online
    3rd January 2010 @ 12:59 AM
    Join Date
    22 Mar 2009
    Location
    Muzaffargarh
    Age
    37
    Posts
    61
    Threads
    7
    Credits
    0
    Thanked
    0

    Default

    copy and paste the following Code....[INSHALLAH aapka kaam ho jaeega]


    ---------------------------------------------------------------------
    <?php
    mysql_connect('localhost','root','') or die("Database not connected");
    mysql_select_db('dw') or die("Database not fount");

    $query = mysql_query("SELECT * FROM tmo Order by id Asc Limit 0, 10");
    echo "<table>
    <tr>
    <th align='center' width='50%'><b>Serial #</b></th>
    <th align='center' width='50%'>&nbsp;<b>Amount</b></th>
    </tr>
    ";
    while($row = mysql_fetch_assoc($query)){
    $id = $row['id'];
    $amount = $row['amount'];
    echo "
    <tr>
    <td>".$id."</td>
    <td>".$amount."</td>
    </tr>
    ";
    }
    echo "</table>";

    ?>

    -------------------------------------------------------------------------

  3. #3
    BossisBack is offline Advance Member
    Last Online
    5th January 2022 @ 11:51 AM
    Join Date
    18 Dec 2007
    Location
    Saudia Arabia
    Age
    34
    Posts
    16,205
    Threads
    743
    Credits
    109
    Thanked
    47

    Default

    Moved to AAE
    آئی ٹی دنیامیں سیگنیچرز میں اتنے بڑے سائز کی امیج لگانا سختی کے ساتھ منع ہے۔۔۔آئی ٹی دنیا ٹیم

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •