is it possible to input a data grid in php like in VB6?
because in my program, user will display lots of data and displaying it in a data grid (clickable) is the best way, we all know that in VB6, once the user clicked anywhere in the grid, it is possible to get the data of the selected row/column..

please help..^_^

8 Years
Discussion Span
Last Post by CJesusSaves

If the out put data comes from a database, then one can store the row IDs in html anchor tags. Then when the user clicks, sends the stored ID back to sql query for all other data retrieval.

After using sql queries to get the data, you can output in table/grid form.

<table >
            <th>Something Else</th>

do { ?>
        <td><a href="myPage.php?id=<? echo $row_stuff['id'];?>"><? echo $row_stuff['stuff']; ?></a></td>
        <td><? echo $row_stuff['more_stuff']; ?></td>
<?php }while ($row_stuff = mysql_fetch_assoc($stuff));

You will then need to use PHP $_GET to get the value of the id stored in the url, look here:
Then again use some sql queries to again retrieve the data and output more of that row data or whatever...

$id = $_GET['id'];
$stuff = mysql_query("SELECT * FROM stuff
WHERE id='$id'");

Otherwise, if not from a database, then it depends on the implementation of the data, each row should have a unique identifier, that way when clicked, the identifier can be used to retrieve data specific to itself.

Is this what you are asking?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.