kendallkamikaze Posted April 24, 2009 Share Posted April 24, 2009 alright so everything here is functional except for the delete all check box doesnt select everything...and when you click the delete all button...that doesnt work either...sofar it seems that its just doing it in opera <?php include 'header.php'; if($_GET[action] == "deleteallmsgs"){ mysql_query("delete from messages where Recipient='$id' and new='no'")or die(mysql_query()); print "<center>All of Your Messages were Deleted.<br><a href=messages.php>Go Back.</a>";include "footer.php";exit;} ?> <br><br> <center> <a href="message_compose.php"> Compose a Message </a> | <a href="messages.php?action=deleteallmsgs"> Delete All Messages </a> <SCRIPT LANGUAGE=JavaScript> function CheckAll() { count = document.frm.elements.length; for (i=0; i < count; i++) { if(document.frm.elements[i].checked == 1) {document.frm.elements[i].checked = 0; } else {document.frm.elements[i].checked = 1;} } } function UncheckAll(){ count = document.frm.elements.length; for (i=0; i < count; i++) { if(document.frm.elements[i].checked == 1) {document.frm.elements[i].checked = 0; } else {document.frm.elements[i].checked = 1;} } } </script> <style type="text/css"> <!-- /* Terence Ordona, portal[AT]imaputz[DOT]com */ /* http://creativecommons.org/licenses/by-sa/2.0/ */ /* begin some basic styling here */ body { color: #000; font: normal normal 12px Verdana, Geneva, Arial, Helvetica, sans-serif; margin: 10px; padding: 0 } table, td, a { color: #000; font: normal normal 12px Verdana, Geneva, Arial, Helvetica, sans-serif } h1 { font: normal normal 18px Verdana, Geneva, Arial, Helvetica, sans-serif; margin: 0 0 5px 0 } h2 { font: normal normal 16px Verdana, Geneva, Arial, Helvetica, sans-serif; margin: 0 0 5px 0 } h3 { font: normal normal 13px Verdana, Geneva, Arial, Helvetica, sans-serif; color: #008000; margin: 0 0 15px 0 } /* end basic styling */ /* define height and width of scrollable area. Add 16px to width for scrollbar */ div.tableContainer { clear: both; border: 1px solid #b3a889; height: 285px; overflow: auto; width: 635px;background-color:b3a889; } /* Reset overflow value to hidden for all non-IE browsers. */ html>body div.tableContainer { overflow: auto; width: 635px;background-color:b3a889; } /* define width of table. IE browsers only */ div.tableContainer table { float: left; width: 635px;background-color:b3a889; } /* define width of table. Add 16px to width for scrollbar. */ /* All other non-IE browsers. */ html>body div.tableContainer table { width: 635px; background-color:b3a889; } /* set table header to a fixed position. WinIE 6.x only */ /* In WinIE 6.x, any element with a position property set to relative and is a child of */ /* an element that has an overflow property set, the relative value translates into fixed. */ /* Ex: parent element DIV with a class of tableContainer has an overflow property set to auto */ thead.fixedHeader tr { position: relative } /* set THEAD element to have block level attributes. All other non-IE browsers */ /* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */ html>body thead.fixedHeader tr { height:19px;display: block } /* make the TH elements pretty */ thead.fixedHeader th { height:19px; } /* make the A elements pretty. makes for nice clickable headers */ thead.fixedHeader a, thead.fixedHeader a:link, thead.fixedHeader a:visited { color: #FFF; display: block; text-decoration: none; width: 635;height:19px; } /* make the A elements pretty. makes for nice clickable headers */ /* WARNING: swapping the background on hover may cause problems in WinIE 6.x */ thead.fixedHeader a:hover { color: #FFF; display: block; text-decoration: underline; width: 630; } /* define the table content to be scrollable */ /* set TBODY element to have block level attributes. All other non-IE browsers */ /* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */ /* induced side effect is that child TDs no longer accept width: auto */ html>body tbody.scrollContent { height: 100%; overflow: none; width: 635; } /* make TD elements pretty. Provide alternating classes for striping the table */ /* http://www.alistapart.com/articles/zebratables/ */ tbody.scrollContent td, tbody.scrollContent tr.normalRow td { height:19px; } tbody.scrollContent tr.alternateRow td { height:19px; } --> </style> <style> .maintable{ font-size:10px; font-family:verdana; color:#000000; background:url(http://i41.tinypic.com/2yw60r6.jpg); } .msg{ font-size:8px; font-family:verdana; color:#000000; background:url(http://i42.tinypic.com/25a5kpw.jpg); } .highlight{ font-size:8px; font-family:verdana; color:#000000; background:url(http://i43.tinypic.com/6huwk6.jpg); } </style> <?php if($_GET[action] == "delete"){print "The selected messages were deleted.<br><a href=messages2.php>Go Back.</a>";} print " <br><Br><form name='frm' method='post' action='messages2.php?action=delete'> <input type='submit' name='massdelete' value='Delete Selection'>"; ?> <div id="tableContainer" class="tableContainer"> <table width=630 border="0" cellpadding="0" cellspacing="0"> <tr><td> <table border="0" cellpadding="0" cellspacing="0" > <tr height=19px> <td class='maintable' height=19px style='background-image: url(http://i43.tinypic.com/2eundbq.jpg);background-repeat: no-repeat; background-position: center center;'><img src='http://i43.tinypic.com/2eundbq.jpg'></td> <td class='maintable' height=19px width=32> <input type='checkbox' name='btn' onclick='CheckAll()'/> </td> <td class='maintable' height=19px width=50 style='background-image: url(http://i41.tinypic.com/2yw60r6.jpg);'> From</td> <td class='maintable' width=235 style='background-image: url(http://i41.tinypic.com/2yw60r6.jpg);'> |Subject</td> <td class='maintable' width=235 style='background-image: url(http://i41.tinypic.com/2yw60r6.jpg);'> |Date</td> <td class='maintable' height=19px style='background-image: url(http://i41.tinypic.com/2yw60r6.jpg);'> |Status</td> <td class='maintable' height=19px style='background-image: url(http://i41.tinypic.com/2yw60r6.jpg);'> </form></td> <td class='maintable' height=19px style='background-image: url(http://i43.tinypic.com/2eundbq.jpg);background-repeat: no-repeat; background-position: center center;'><img src='http://i43.tinypic.com/2eundbq.jpg'></td> </tr> </table> </td></tr> <tr><td> <table width=635 border="0" cellpadding="0" cellspacing="0" > <tbody class="scrollContent"> <?php $sql="SELECT * FROM messages WHERE Recipient='$id' order by id desc "; $result=mysql_query($sql); $msgs=mysql_num_rows($result); $checkbox = $_POST['checkbox']; if(!empty($checkbox)){ $massdelete = $_GET['massdelete']; if(massdelete){ for($i=0;$i<$msgs;$i++){ $deleteid = $checkbox[$i]; mysql_query("delete from messages where id='$deleteid'"); //echo ("$checkbox<br>"); //display all msg ids deleted } }} //and new='yes' if($msgs == "0"){ print "<tr><td colspan=5><center>No Messages.</td></tr>"; } for($i=0;$i<$msgs;$i++) { $r=mysql_fetch_array($result); $mid=$r["id"]; $Sender=$r["Sender"]; $Subject=$r["Subject"]; $Message=$r["Message"]; $Date=$r["date"]; $New=$r["new"]; if($New == "no"){$rou="Read";} if($New == "yes"){$rou="Unread";} if(empty($Subject)){$Subject="No Subject";} //Sunday 6/18/2008 2:38pm //$Date=str_replace(D n/j/y g:ia,$Date); echo " <tr class='msg' class='scrollContent' onMouseOver=this.className='highlight' onMouseOut=this.className='msg'> <td width=29><input type=checkbox name='checkbox[]' value='$mid'></form></td> <td width=57><b><a href=player_individual.php?id=$Sender>#$Sender</a></b></td> <td width=235><b><a href='message_viewindividual.php?id=$mid'>$Subject</a></b></td> <td width=230><i>$Date</i></td> <td><center><b>$rou</b></center></td> </tr> "; } ?> </table> </td></tr> </tbody> </table></div> <BR><BR> <?php include "footer.php"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/155448-php-conflict-with-browsers-on-message-box/ Share on other sites More sharing options...
mikesta707 Posted April 24, 2009 Share Posted April 24, 2009 I didnt read it all but from the first few lines I saw an error change this if($_GET[action] == "deleteallmsgs"){ to if($_GET['action'] == "deleteallmsgs"){ I hope that helps! Sorry if it doesn't. Quote Link to comment https://forums.phpfreaks.com/topic/155448-php-conflict-with-browsers-on-message-box/#findComment-817979 Share on other sites More sharing options...
darkfreaks Posted April 24, 2009 Share Posted April 24, 2009 Change this: <?php mysql_query("delete from messages where Recipient='$id' and new='no'")or die(mysql_query());?> To This: <?php mysql_query("delete from messages where Recipient='$id' and new='no'")or die(mysql_error()); ?> Quote Link to comment https://forums.phpfreaks.com/topic/155448-php-conflict-with-browsers-on-message-box/#findComment-817990 Share on other sites More sharing options...
kendallkamikaze Posted April 24, 2009 Author Share Posted April 24, 2009 Change this: <?php mysql_query("delete from messages where Recipient='$id' and new='no'")or die(mysql_query());?> To This: <?php mysql_query("delete from messages where Recipient='$id' and new='no'")or die(mysql_error()); ?> I cant find this part? I dont see any of them that have ....(mysql_error()); ?> Updated: no errors but still not functioning <?php include 'header.php'; if($_GET['action'] == "deleteallmsgs"){ mysql_query("delete from messages where Recipient='$id' and new='no'")or die(mysql_query()); print "<center>All of Your Messages were Deleted.<br><a href=messages.php>Go Back.</a>";include "footer.php";exit;} ?> <br><br> <center> <a href="message_compose.php"> Compose a Message </a> | <a href="messages.php?action=deleteallmsgs"> Delete All Messages </a> <SCRIPT LANGUAGE=JavaScript> function CheckAll() { count = document.frm.elements.length; for (i=0; i < count; i++) { if(document.frm.elements[i].checked == 1;) {document.frm.elements[i].checked = 0;} else {document.frm.elements[i].checked = 1;} } } function UncheckAll(){ count = document.frm.elements.length; for (i=0; i < count; i++) { if(document.frm.elements[i].checked == 1;) {document.frm.elements[i].checked = 0;} else {document.frm.elements[i].checked = 1;} } } </script> <style type="text/css"> <!-- /* Terence Ordona, portal[AT]imaputz[DOT]com */ /* http://creativecommons.org/licenses/by-sa/2.0/ */ /* begin some basic styling here */ body { color: #000; font: normal normal 12px Verdana, Geneva, Arial, Helvetica, sans-serif; margin: 10px; padding: 0 } table, td, a { color: #000; font: normal normal 12px Verdana, Geneva, Arial, Helvetica, sans-serif } h1 { font: normal normal 18px Verdana, Geneva, Arial, Helvetica, sans-serif; margin: 0 0 5px 0 } h2 { font: normal normal 16px Verdana, Geneva, Arial, Helvetica, sans-serif; margin: 0 0 5px 0 } h3 { font: normal normal 13px Verdana, Geneva, Arial, Helvetica, sans-serif; color: #008000; margin: 0 0 15px 0 } /* end basic styling */ /* define height and width of scrollable area. Add 16px to width for scrollbar */ div.tableContainer { clear: both; border: 1px solid #b3a889; height: 285px; overflow: auto; width: 635px;background-color:b3a889; } /* Reset overflow value to hidden for all non-IE browsers. */ html>body div.tableContainer { overflow: auto; width: 635px;background-color:b3a889; } /* define width of table. IE browsers only */ div.tableContainer table { float: left; width: 635px;background-color:b3a889; } /* define width of table. Add 16px to width for scrollbar. */ /* All other non-IE browsers. */ html>body div.tableContainer table { width: 635px; background-color:b3a889; } /* set table header to a fixed position. WinIE 6.x only */ /* In WinIE 6.x, any element with a position property set to relative and is a child of */ /* an element that has an overflow property set, the relative value translates into fixed. */ /* Ex: parent element DIV with a class of tableContainer has an overflow property set to auto */ thead.fixedHeader tr { position: relative } /* set THEAD element to have block level attributes. All other non-IE browsers */ /* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */ html>body thead.fixedHeader tr { height:19px;display: block } /* make the TH elements pretty */ thead.fixedHeader th { height:19px; } /* make the A elements pretty. makes for nice clickable headers */ thead.fixedHeader a, thead.fixedHeader a:link, thead.fixedHeader a:visited { color: #FFF; display: block; text-decoration: none; width: 635;height:19px; } /* make the A elements pretty. makes for nice clickable headers */ /* WARNING: swapping the background on hover may cause problems in WinIE 6.x */ thead.fixedHeader a:hover { color: #FFF; display: block; text-decoration: underline; width: 630; } /* define the table content to be scrollable */ /* set TBODY element to have block level attributes. All other non-IE browsers */ /* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */ /* induced side effect is that child TDs no longer accept width: auto */ html>body tbody.scrollContent { height: 100%; overflow: none; width: 635; } /* make TD elements pretty. Provide alternating classes for striping the table */ /* http://www.alistapart.com/articles/zebratables/ */ tbody.scrollContent td, tbody.scrollContent tr.normalRow td { height:19px; } tbody.scrollContent tr.alternateRow td { height:19px; } --> </style> <style> .maintable{ font-size:10px; font-family:verdana; color:#000000; background:url(http://i41.tinypic.com/2yw60r6.jpg); } .msg{ font-size:8px; font-family:verdana; color:#000000; background:url(http://i42.tinypic.com/25a5kpw.jpg); } .highlight{ font-size:8px; font-family:verdana; color:#000000; background:url(http://i43.tinypic.com/6huwk6.jpg); } </style> <?php if($_GET[action] == "delete"){print "The selected messages were deleted.<br><a href=messages2.php>Go Back.</a>";} print " <br><Br><form name='frm' method='post' action='messages2.php?action=delete'> <input type='submit' name='massdelete' value='Delete Selection'>"; ?> <div id="tableContainer" class="tableContainer"> <table width=630 border="0" cellpadding="0" cellspacing="0"> <tr><td> <table border="0" cellpadding="0" cellspacing="0" > <tr height=19px> <td class='maintable' height=19px style='background-image: url(http://i43.tinypic.com/2eundbq.jpg);background-repeat: no-repeat; background-position: center center;'><img src='http://i43.tinypic.com/2eundbq.jpg'></td> <td class='maintable' height=19px width=32> <input type='checkbox' name='btn' onclick='CheckAll()'/> </td> <td class='maintable' height=19px width=50 style='background-image: url(http://i41.tinypic.com/2yw60r6.jpg);'> From</td> <td class='maintable' width=235 style='background-image: url(http://i41.tinypic.com/2yw60r6.jpg);'> |Subject</td> <td class='maintable' width=235 style='background-image: url(http://i41.tinypic.com/2yw60r6.jpg);'> |Date</td> <td class='maintable' height=19px style='background-image: url(http://i41.tinypic.com/2yw60r6.jpg);'> |Status</td> <td class='maintable' height=19px style='background-image: url(http://i41.tinypic.com/2yw60r6.jpg);'> </form></td> <td class='maintable' height=19px style='background-image: url(http://i43.tinypic.com/2eundbq.jpg);background-repeat: no-repeat; background-position: center center;'><img src='http://i43.tinypic.com/2eundbq.jpg'></td> </tr> </table> </td></tr> <tr><td> <table width=635 border="0" cellpadding="0" cellspacing="0" > <tbody class="scrollContent"> <?php $sql="SELECT * FROM messages WHERE Recipient='$id' order by id desc "; $result=mysql_query($sql); $msgs=mysql_num_rows($result); $checkbox = $_POST['checkbox']; if(!empty($checkbox)){ $massdelete = $_GET['massdelete']; if(massdelete){ for($i=0;$i<$msgs;$i++){ $deleteid = $checkbox[$i]; mysql_query("delete from messages where id='$deleteid'"); //echo ("$checkbox<br>"); //display all msg ids deleted } }} //and new='yes' if($msgs == "0"){ print "<tr><td colspan=5><center>No Messages.</td></tr>"; } for($i=0;$i<$msgs;$i++) { $r=mysql_fetch_array($result); $mid=$r["id"]; $Sender=$r["Sender"]; $Subject=$r["Subject"]; $Message=$r["Message"]; $Date=$r["date"]; $New=$r["new"]; if($New == "no"){$rou="Read";} if($New == "yes"){$rou="Unread";} if(empty($Subject)){$Subject="No Subject";} //Sunday 6/18/2008 2:38pm //$Date=str_replace(D n/j/y g:ia,$Date); echo " <tr class='msg' class='scrollContent' onMouseOver=this.className='highlight' onMouseOut=this.className='msg'> <td width=29><input type=checkbox name='checkbox[]' value='$mid'></form></td> <td width=57><b><a href=player_individual.php?id=$Sender>#$Sender</a></b></td> <td width=235><b><a href='message_viewindividual.php?id=$mid'>$Subject</a></b></td> <td width=230><i>$Date</i></td> <td><center><b>$rou</b></center></td> </tr> "; } ?> </table> </td></tr> </tbody> </table></div> <BR><BR> <?php include "footer.php"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/155448-php-conflict-with-browsers-on-message-box/#findComment-817992 Share on other sites More sharing options...
mikesta707 Posted April 24, 2009 Share Posted April 24, 2009 get rid of all the crap in that code. just post the PHP, there is like a bunch of lines of CSS and a bunch of Javascript and HTML that I can't reference back and forth between the PHP that talks to each other. Another error i see is if(massdelete){ for($i=0;$i<$msgs;$i++){ $deleteid = $checkbox[$i]; change it to if($massdelete){ for($i=0;$i<$msgs;$i++){ $deleteid = $checkbox[$i]; Quote Link to comment https://forums.phpfreaks.com/topic/155448-php-conflict-with-browsers-on-message-box/#findComment-817998 Share on other sites More sharing options...
darkfreaks Posted April 24, 2009 Share Posted April 24, 2009 or die(mysql_query()) just kills the query. or die(mysql_error()) kills the query and outputs MYSQL error Quote Link to comment https://forums.phpfreaks.com/topic/155448-php-conflict-with-browsers-on-message-box/#findComment-818000 Share on other sites More sharing options...
kendallkamikaze Posted April 24, 2009 Author Share Posted April 24, 2009 Updated with both your guys changes: still not selecting all check boxes, or deleting any of the checked items and no errors. Update: <?php include 'header.php'; if($_GET['action'] == "deleteallmsgs"){ mysql_query("delete from messages where Recipient='$id' and new='no'")or die(mysql_error()); print "<center>All of Your Messages were Deleted.<br><a href=messages.php>Go Back.</a>";include "footer.php";exit;} ?> <br><br> <center> <a href="message_compose.php"> Compose a Message </a> | <a href="messages.php?action=deleteallmsgs"> Delete All Messages </a> <SCRIPT LANGUAGE=JavaScript> function CheckAll() { count = document.frm.elements.length; for (i=0; i < count; i++) { if(document.frm.elements[i].checked == 1;) {document.frm.elements[i].checked = 0;} else {document.frm.elements[i].checked = 1;} } } function UncheckAll(){ count = document.frm.elements.length; for (i=0; i < count; i++) { if(document.frm.elements[i].checked == 1;) {document.frm.elements[i].checked = 0;} else {document.frm.elements[i].checked = 1;} } } </script> <style type="text/css"> <!-- /* Terence Ordona, portal[AT]imaputz[DOT]com */ /* http://creativecommons.org/licenses/by-sa/2.0/ */ /* begin some basic styling here */ body { color: #000; font: normal normal 12px Verdana, Geneva, Arial, Helvetica, sans-serif; margin: 10px; padding: 0 } table, td, a { color: #000; font: normal normal 12px Verdana, Geneva, Arial, Helvetica, sans-serif } h1 { font: normal normal 18px Verdana, Geneva, Arial, Helvetica, sans-serif; margin: 0 0 5px 0 } h2 { font: normal normal 16px Verdana, Geneva, Arial, Helvetica, sans-serif; margin: 0 0 5px 0 } h3 { font: normal normal 13px Verdana, Geneva, Arial, Helvetica, sans-serif; color: #008000; margin: 0 0 15px 0 } /* end basic styling */ /* define height and width of scrollable area. Add 16px to width for scrollbar */ div.tableContainer { clear: both; border: 1px solid #b3a889; height: 285px; overflow: auto; width: 635px;background-color:b3a889; } /* Reset overflow value to hidden for all non-IE browsers. */ html>body div.tableContainer { overflow: auto; width: 635px;background-color:b3a889; } /* define width of table. IE browsers only */ div.tableContainer table { float: left; width: 635px;background-color:b3a889; } /* define width of table. Add 16px to width for scrollbar. */ /* All other non-IE browsers. */ html>body div.tableContainer table { width: 635px; background-color:b3a889; } /* set table header to a fixed position. WinIE 6.x only */ /* In WinIE 6.x, any element with a position property set to relative and is a child of */ /* an element that has an overflow property set, the relative value translates into fixed. */ /* Ex: parent element DIV with a class of tableContainer has an overflow property set to auto */ thead.fixedHeader tr { position: relative } /* set THEAD element to have block level attributes. All other non-IE browsers */ /* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */ html>body thead.fixedHeader tr { height:19px;display: block } /* make the TH elements pretty */ thead.fixedHeader th { height:19px; } /* make the A elements pretty. makes for nice clickable headers */ thead.fixedHeader a, thead.fixedHeader a:link, thead.fixedHeader a:visited { color: #FFF; display: block; text-decoration: none; width: 635;height:19px; } /* make the A elements pretty. makes for nice clickable headers */ /* WARNING: swapping the background on hover may cause problems in WinIE 6.x */ thead.fixedHeader a:hover { color: #FFF; display: block; text-decoration: underline; width: 630; } /* define the table content to be scrollable */ /* set TBODY element to have block level attributes. All other non-IE browsers */ /* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */ /* induced side effect is that child TDs no longer accept width: auto */ html>body tbody.scrollContent { height: 100%; overflow: none; width: 635; } /* make TD elements pretty. Provide alternating classes for striping the table */ /* http://www.alistapart.com/articles/zebratables/ */ tbody.scrollContent td, tbody.scrollContent tr.normalRow td { height:19px; } tbody.scrollContent tr.alternateRow td { height:19px; } --> </style> <style> .maintable{ font-size:10px; font-family:verdana; color:#000000; background:url(http://i41.tinypic.com/2yw60r6.jpg); } .msg{ font-size:8px; font-family:verdana; color:#000000; background:url(http://i42.tinypic.com/25a5kpw.jpg); } .highlight{ font-size:8px; font-family:verdana; color:#000000; background:url(http://i43.tinypic.com/6huwk6.jpg); } </style> <?php if($_GET[action] == "delete"){print "The selected messages were deleted.<br><a href=messages2.php>Go Back.</a>";} print " <br><Br><form name='frm' method='post' action='messages2.php?action=delete'> <input type='submit' name='massdelete' value='Delete Selection'>"; ?> <div id="tableContainer" class="tableContainer"> <table width=630 border="0" cellpadding="0" cellspacing="0"> <tr><td> <table border="0" cellpadding="0" cellspacing="0" > <tr height=19px> <td class='maintable' height=19px style='background-image: url(http://i43.tinypic.com/2eundbq.jpg);background-repeat: no-repeat; background-position: center center;'><img src='http://i43.tinypic.com/2eundbq.jpg'></td> <td class='maintable' height=19px width=32> <input type='checkbox' name='btn' onclick='CheckAll()'/> </td> <td class='maintable' height=19px width=50 style='background-image: url(http://i41.tinypic.com/2yw60r6.jpg);'> From</td> <td class='maintable' width=235 style='background-image: url(http://i41.tinypic.com/2yw60r6.jpg);'> |Subject</td> <td class='maintable' width=235 style='background-image: url(http://i41.tinypic.com/2yw60r6.jpg);'> |Date</td> <td class='maintable' height=19px style='background-image: url(http://i41.tinypic.com/2yw60r6.jpg);'> |Status</td> <td class='maintable' height=19px style='background-image: url(http://i41.tinypic.com/2yw60r6.jpg);'> </form></td> <td class='maintable' height=19px style='background-image: url(http://i43.tinypic.com/2eundbq.jpg);background-repeat: no-repeat; background-position: center center;'><img src='http://i43.tinypic.com/2eundbq.jpg'></td> </tr> </table> </td></tr> <tr><td> <table width=635 border="0" cellpadding="0" cellspacing="0" > <tbody class="scrollContent"> <?php $sql="SELECT * FROM messages WHERE Recipient='$id' order by id desc "; $result=mysql_query($sql); $msgs=mysql_num_rows($result); $checkbox = $_POST['checkbox']; if(!empty($checkbox)){ $massdelete = $_GET['massdelete']; if($massdelete){ for($i=0;$i<$msgs;$i++){ $deleteid = $checkbox[$i]; mysql_query("delete from messages where id='$deleteid'"); //echo ("$checkbox<br>"); //display all msg ids deleted } }} //and new='yes' if($msgs == "0"){ print "<tr><td colspan=5><center>No Messages.</td></tr>"; } for($i=0;$i<$msgs;$i++) { $r=mysql_fetch_array($result); $mid=$r["id"]; $Sender=$r["Sender"]; $Subject=$r["Subject"]; $Message=$r["Message"]; $Date=$r["date"]; $New=$r["new"]; if($New == "no"){$rou="Read";} if($New == "yes"){$rou="Unread";} if(empty($Subject)){$Subject="No Subject";} //Sunday 6/18/2008 2:38pm //$Date=str_replace(D n/j/y g:ia,$Date); echo " <tr class='msg' class='scrollContent' onMouseOver=this.className='highlight' onMouseOut=this.className='msg'> <td width=29><input type=checkbox name='checkbox[]' value='$mid'></form></td> <td width=57><b><a href=player_individual.php?id=$Sender>#$Sender</a></b></td> <td width=235><b><a href='message_viewindividual.php?id=$mid'>$Subject</a></b></td> <td width=230><i>$Date</i></td> <td><center><b>$rou</b></center></td> </tr> "; } ?> </table> </td></tr> </tbody> </table></div> <BR><BR> <?php include "footer.php"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/155448-php-conflict-with-browsers-on-message-box/#findComment-818002 Share on other sites More sharing options...
mikesta707 Posted April 24, 2009 Share Posted April 24, 2009 if($_GET[action] == "delete"){print "The selected messages were deleted.<br><a href=messages2.php>Go Back.</a>";} print " to if($_GET['action'] == "delete"){print "The selected messages were deleted.<br><a href=messages2.php>Go Back.</a>";} print " based on what I just corrected, you need to go through your entire code and fix your syntax errors, and stop posting that super long code snippet. Just post the PHP please. We dont need to see the CSS or Javascript, unless they change the PHP some how Quote Link to comment https://forums.phpfreaks.com/topic/155448-php-conflict-with-browsers-on-message-box/#findComment-818005 Share on other sites More sharing options...
darkfreaks Posted April 24, 2009 Share Posted April 24, 2009 Try: <?php if(!empty($checkbox||$checkbox!=="")){} ?> Quote Link to comment https://forums.phpfreaks.com/topic/155448-php-conflict-with-browsers-on-message-box/#findComment-818006 Share on other sites More sharing options...
mikesta707 Posted April 24, 2009 Share Posted April 24, 2009 Try: <?php if(!empty($checkbox||$checkbox!=="")){} ?> that needs to be: <?php if(!empty($checkbox) || $checkbox !== "")){} ?> (just forgot a parenthesis Quote Link to comment https://forums.phpfreaks.com/topic/155448-php-conflict-with-browsers-on-message-box/#findComment-818007 Share on other sites More sharing options...
kendallkamikaze Posted April 24, 2009 Author Share Posted April 24, 2009 that didnt really do anything. the issue I have with the PHP is that when you check the boxes and click delete, it doesnt delete them. Quote Link to comment https://forums.phpfreaks.com/topic/155448-php-conflict-with-browsers-on-message-box/#findComment-818058 Share on other sites More sharing options...
kendallkamikaze Posted April 24, 2009 Author Share Posted April 24, 2009 <SCRIPT LANGUAGE=JavaScript> function CheckAll() { count = document.frm.elements.length; for (i=0; i < count; i++) { if(document.frm.elements[i].checked == 1;) {document.frm.elements[i].checked = 0;} else {document.frm.elements[i].checked = 1;} } } function UncheckAll(){ count = document.frm.elements.length; for (i=0; i < count; i++) { if(document.frm.elements[i].checked == 1;) {document.frm.elements[i].checked = 0;} else {document.frm.elements[i].checked = 1;} } } </script> <input type='checkbox' name='btn' onclick='CheckAll()'/> Quote Link to comment https://forums.phpfreaks.com/topic/155448-php-conflict-with-browsers-on-message-box/#findComment-818064 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.