0

Hi Guys I need help. I have a table and when I clicked the table row(PID 1 below) Ill get the info of the row 1(PID) and pass it on the other form(form2). Thank You in advance.

pid  prno
1    one
2    two

this is my code in loading the table and I do not know how to pass the clicked row.

<table> <?php
    $loadp= "SELECT * from tbl1 b inner join tbl2 c on b.logid = c.logid";
    $res = mysqli_query($con, $loadp);
    if (mysqli_num_rows($res) > 0) {
    while($rowa = mysqli_fetch_assoc($res)) {
    echo "<tr> <td>".$rowa['pid']."</td>.
        <td><a href='#'>".$rowa['prno']."</a></td>" . 
        </tr>";
    } //while
    }else{
        echo "0 results";
    //else
    }
?> <table> 
2
Contributors
3
Replies
18
Views
1 Year
Discussion Span
Last Post by bLuEmEzzy
1
echo "<tr><td>" . $rowa['pid'] . "</td><td><a href='yourpage.php?id={$rowa['pid']}'>" . $rowa['prno'] . "</a></td></tr>";
0

Hi sir, thank you for your reply.
in my form or page 2 how can i retrieve the id? Thank You.

This question has already been answered. 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.