Answer the question
In order to leave comments, you need to log in
Data output based on hyperlink?
Hello again!
There is a DB MYSQL and a hyperlink that looks like this:
localhost/baze/inventory.php?inv=inv651 (it simulates a future hyperlink encrypted in qr),
how to get this inv (if I remember correctly, something like this: $_GET['inv' ]), and how to display the data from the table with such an inv after receiving the data? Now the data output from the database looks like this:
<?php
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,'logins');
$query = "SELECT * FROM test";
$query_run = mysqli_query($connection,$query);
?>
<table >
<thead >
<tr>
<th scope="col">#</th>
<th scope="col">Инв. номер</th>
<th scope="col">Название</th>
<th scope="col">Цена</th>
<th scope="col">Пользователь</th>
<th scope="col" >Функции</th>
</tr>
</thead>
<?php
if($query_run)
{$i = 1;
foreach($query_run as $row)
{
?>
<tbody>
<tr >
<td> <?php echo $row['id'];
?>
</td>
<td> <?php echo $row['invnum'];?></td>
<td> <?php echo $row['name'];?></td>
<td> <?php echo $row['price'];?></td>
<td> <?php echo $row['user'];?></td>
<td>
<button type="button" class="btn btn-success editbt">Правка</button>
</td>
<td>
<button type="button" class="btn btn-danger delbt">Удалить</button>
</td>
<td>
<button type="button" class="btn btn-primary checkbt">Отметить</button>
</td>
</tr>
</tbody>
<?php
}
}
else{
echo'Записи не найдены';
}
?>
</table>
Answer the question
In order to leave comments, you need to log in
If you don’t bother, then with the help of https://masonry.desandro.com/layout.html ))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question