Answer the question
In order to leave comments, you need to log in
How to add data to a db cell?
There is a pending cell, by clicking on different buttons, some data should be added to the cell.
There is a code:
$r = $connection->query("SELECT pending FROM personal_data WHERE connect_id = '$userlogin'");
while($row2 = $r->fetch()){
$kastinglist = $row['pending'];
echo $kastinglist;
}
try{
$kastinglist = $kastinglist . ',' . $_POST['id'];
$stmt = $connection->prepare("UPDATE personal_data SET
pending = :pending
WHERE connect_id = '$userlogin'");
$stmt->execute(array(
':pending' => $kastinglist
));
echo $kastinglist;
?> Анкета пользователя <?php echo $userlogin ?> обновлена <?php
}catch(PDOException $e){
echo 'ERROR:' . $e->getMessage();
}
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