Answer the question
In order to leave comments, you need to log in
Why is the data in the table not changing. UPDATE command - php?
Why is the data in the table not changing ? UPDATE command - php
Handler code:
$vidreds = $_POST['id'];//
$vstatus = 'novisible';
$link->set_charset('utf8');
$sql = mysqli_query($link, "UPDATE `singles` SET M=('$vstatus') WHERE id='$vidreds'");
<form action="editfilms.php" method="post">
<tbody>
<tr>
<td>
<div class="main__table-text" name="<?php echo $film["id"]; ?>"><?php echo $film["id"]; ?></div>
</td>
<td>
<div class="main__table-text"><?php echo $film["title"]; ?></div>
</td>
<td>
<div class="main__table-text main__table-text--rate"><i class="icon ion-ios-star"></i> <?php echo $film["rating"]; ?></div>
</td>
<td>
<div class="main__table-text"><?php echo $film["genre"]; ?></div>
</td>
<td>
<div class="main__table-text"><?php echo $film["views"]; ?></div>
</td>
<td>
<div class="main__table-text main__table-text--green"><?php echo $film["M"]; ?></div>
</td>
<td>
<div class="main__table-text"><?php echo $film["date"]; ?></div>
</td>
<td>
</tr>
<button type="submit">YES YES YES</button>
</tbody>
</form> <?php } ?>
$film["id"]
, the ID of the line is passed, which is passed to the handler code. Except... column "M" doesn't change to novisible
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