SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help needed regarding php

    s
    Last edited by th14; Apr 14, 2006 at 09:04.

  2. #2
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thread moved to a more appropriate forum

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  3. #3
    SitePoint Evangelist Waffles's Avatar
    Join Date
    Nov 2005
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    // rest of code..


    $sql "SELECT * FROM suppliers WHERE supplier_id = '".$supplier_id."'";
    $result mysql_query($sql);
    $row mysql_fetch_assoc($result);


    /* do something like */ 

    echo '<table width="700" cellpadding="5" cellspacing="0" border="1">';

    # row 1
    echo '<tr><td><h4>'.'Supplier Name:' '</td><td>' $row['supplier_name'] . ' ' '</h4></td></tr>';

    # row 2
    echo '<tr><td><h4>'.'Reference Number:' '</td><td>' $row['supplier_ref_number'] . ' ' '</h4></td></tr>';


    // and so on
    // hope you see what i mean, if i understood you correctly :)

    echo '</table>'// end table
    }
    ?> 

    that would echo the results into a table with each 'line' in a new row

    you just need to put a <tr><td> before each <h4>, and after the heading put </td>.. then when you display the actual data, open a new column with <td> and close it with </td></tr> after the </h4>
    Last edited by Waffles; Apr 8, 2006 at 07:11. Reason: missed a '

  4. #4
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank u waffle i l give it a try


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
  •