So I'm needing help with my private message checkbox that's replaced the img url thingy. This is my class_messagetablehelper.php file
protected function getDeleteLink($param){
$path = Registry::get("path");
$deletebox = new Comment("<form action='../../messages' method='post'>
<input type='checkbox' class='checkbox' name='checkdelete' value='Delete'>
<input id='input' class='button' type='submit' value='DELETE'>
</form>
<style>
input.checkbox {
position: relative;
top: 15px;
}
input#input {
position: relative;
left: 0px;
bottom: -15px;
background-color: red;
font-weight: bold;
width: 80px;
}
</style>
<script>
var checkboxes=document.getElementsByClassName('checkbox');
for(let i=0;i<checkboxes.length;i++){
checkboxes.onclick=function(){
if (checkboxes.checked) {
checkboxes.style.outlineColor = 'red';
checkboxes.style.outlineStyle = 'solid';
} else {
checkboxes.style.outlineColor = 'none';
checkboxes.style.outlineStyle = 'none';
}
};
}
</script>");
return $deletebox;
}
and this is my messageview.php (I'm using 1.3.5)
if($mysidia->input->post("checkdelete")){
$mysidia->db->delete("messages");
}
and it functions and all, but it deletes all the private messages in database instead of ones selected. I'm not a PHP/Java coder, I literally research and piece together and this is as far as I can get... I got it functioning, but can't get the messages to recognize checked pms and delete appropriately.