Question

Please help :(

<?php
include 'dbFunctions.php';
session_start();
$user_id = $_SESSION['user_id'];
?>

<table>
    <td>
        <b><label for="billinghistory">Billing History:</b></label>
        <select name="billing_history"

The following codes can't seem to print my transaction history, I am not sure if I have chosen the correct fields.

<?php
$query3 = "SELECT * from billinghistory";
$result3 = mysqli_query($link, $query3) or die(mysqli_error($link));
    while ($row3 = mysqli_fetch_array($result3)) {
        $billing_name = $row3['billing_name'];
        $billing_name_id = $row3['billing_name_id'];
?>

            <option value="<?php echo $billing_name; ?> "><?php echo $billing_name ;?></option>
        </select>     
    </td>
</table>

No correct solution

OTHER TIPS

Try

while ($row3 = mysqli_fetch_array($result3,MYSQLI_ASSOC)) {
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top