Advertisement
markotvz

Problem - no idea how to fix it -.-"

Jun 27th, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.66 KB | None | 0 0
  1. Error:
  2.  
  3. Undefined variable: checked in D:\Programs\XAMPP\htdocs\blog\admin\add-post.php on line 152
  4.  
  5. Here is code from line 130 - 155 so please help
  6.  
  7. 130         <?php  
  8.  
  9.             $stmt2 = $db->query('SELECT catID, catTitle FROM blog_cats ORDER BY catTitle');
  10.             while($row2 = $stmt2->fetch()){
  11.  
  12.                 if(isset($_POST['catID'])){
  13.  
  14.                     if(in_array($row2['catID'], $_POST['catID'])){
  15.                        $checked="checked='checked'";
  16.                     }else{
  17.                        $checked = null;
  18.                     }
  19.                 }
  20.  
  21. 152             echo "<input type='checkbox' name='catID[]' value='".$row2['catID']."' $checked> ".$row2['catTitle']."<br />";
  22.             }
  23.  
  24. 155         ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement