query("DELETE FROM `achievement` WHERE id = '$id'"); echo ''; } $chk = $con->query("SELECT * FROM setting WHERE type = 'achievment_title' "); if(isset($_POST['achievment_title'])){ if($chk->num_rows){ $con->query("UPDATE `setting` SET `value` = '".$_POST['achievment_title']."' WHERE `setting`.`type` = 'achievment_title'"); alert("Update SUccessfully"); } else{ $con->query("INSERT INTO `setting` (`id`, `type`, `value`, `value1`) VALUES (NULL, 'achievment_title', '".$_POST['achievment_title']."', '')"); alert("Added SUccessfully"); } aj_redirect(); } $title = $chk->num_rows ? $chk->fetch_assoc()['value'] : ''; ?>
Achievments Setting
Add Achievments
List Achievements
query("SELECT * FROM `achievement`"); if($data->num_rows>0){ $i = 1; while($d = $data->fetch_assoc()){ echo ' '; } } ?>
# Title Description Delete
'.$i++.' '.$d['title'].' '.$d['description'].'