简体   繁体   中英

how to post database fetch values from one page to anthor page using HTML table

in this code

"<td align="left"><a href="admin_order_update.php">' .$row['o_id'] .'</a></td>"

i generate multiple o_id so when i click on other particular o_id this o_id post by other page and on that behalf i can access this o_id in multiple pages but im trying to use hidden type but it not working so any other process to post this value other page.... it is possible to send this so please help me....
and one more thing i using hidden type but is not working also how it's work for post the value from one page to other page using html in php tag....

$sql1 = " select count(status) as count from bill_generation_request where hotel_id = '$hid' and status ='yes'";

$result = mysql_query($sql1);

        while ($row = mysql_fetch_array($result))
    {
    $count = $row['count'];
    }

 echo '<table align="center" cellspacing="0" cellpadding="5" width="0%" border="1"> <tr>        
        <td align="left"><b>Bill Request Count</b></td>';   
 echo '<td align="left">' .$count . '</td> ';
 echo '</tr>';
 echo '</table>';
echo '<table align="center" cellspacing="0" cellpadding="5" width="75%" border="1">
 <tr>
 <td align="left"><b>Order Number</b></td>
 <td align="left"><b>Table Number</b></td>
 <td align="left"><b>Item Count</b></td>
 <td align="left"><b>Order Time</b></td>
 <td align="left"><b>Total Amount</b></td>
 <td align="left"><b>Order Note</b></td>
 <td align="left"><b>Note</b></td>
 </tr> ';
$i=0;
while ($row = mysql_fetch_array($res))
    {   
        $oid = $row['o_id'];
     echo '<tr bgcolor="' . $bg . '">
         <td align="left"><a href="admin_order_update.php">' .$row['o_id'] .'</a></td>
         <td align="left">' . $row['tableid'] . '</td>
         <td align="left">' . $row['total_count'] . '</td>
         <td align="left">' .$row['time'] . '</td>
         <td align="left">' .$row['amount'] . '</td>
         <td align="left">' .$row['onote'] . '</td>
         <td align="left">' .$row['note'] . '</td>
         </tr>';

    $i++;
    }

 echo '</table>';


mysql_close($con);

Try like

$id = $row['o_id'];
<td align="left"><a href="admin_order_update.php?id=$id">' .$row['o_id'] .'</a></td>

and Use $_GET['id'] to get that id

Try this

$id = $row['o_id'];
<td align="left"><a href="admin_order_update.php?id=$id">' .$row['o_id'] .'</a></td>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM