Answer the question
In order to leave comments, you need to log in
How to update value in mysql selected in select?
There is a table on the site whose rows are displayed with mysql
Here is the output code + tables
<table class="table-striped" border="1" style="font-size:13px;width: 100%;max-width: 100%;text-align:center;border: 1px solid #d9d9d9;">
<thead>
<tr>
<th>ID</th>
<th>Пользователь</th>
<th>Дата</th>
<th>Тип</th>
<th>Кошелёк</th>
<th>Сумма</th>
<th>Статус</th>
</tr>
</thead>
<tbody>
<? $results = mysql_query("SELECT * FROM `pay` WHERE 1 ORDER BY status='Готово'", $db);
while ($rows = mysql_fetch_array($results)) {
$vid = $rows["id"];
$vuser = $rows["user"];
$vdata = $rows["data"];
$vpayment = $rows["payment"];
$vcosh = $rows["cosh"];
$vsumma = $rows["summa"];
$vstatus = $rows["status"];
?>
<tr>
<th scope="row"><?php echo $vid; ?></th>
<th scope="row"><?php echo $vuser; ?></th>
<th scope="row"><?php echo $vdata; ?></th>
<td><? echo $vpayment; ?></td>
<td><? echo $vcosh; ?></td>
<td><? echo $vsumma; ?></td>
<td>
<select name="status">
<option disabled selected ><? echo $vstatus; ?></option>
<option value="Ожидание">Ожидание</option>
<option value="Готово">Готово</option>
</select>
</td>
</tr>
<?}?>
</tbody>
</table>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question