php - Keep the changes MySQL
Get the solution ↓↓↓Solution:
I think this is the sort of thing you are trying to achieve. (untested).
<?php
if(isset($_GET['id'])){
$id = $_GET['id'];
$sql = "UPDATE data SET ap = 1 WHERE id = $id" ;
$retval = mysqli_query($dbcon,$sql);
$result = mysqli_query($dbcon,"SELECT ap,id FROM data WHERE id = '$id'") or die(mysql_error());
// set a counter here
$i=1;
?>
<?php while ($row = mysqli_fetch_array($result)): ?>
<div id="<?php if($row['ap'] == 1 and $row['idd'] == 1){echo:"s$ip";}else{echo:"s$i";}?>" class="boxabs"></div>
<?php $i++; ?>
<?php endwhile; ?>
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: closed without sending a request; it was probably just an unused speculative preconnection
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.