Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $primaryCatid = $primaryCat['id']; ?>
- <?php echo $primaryCatid ?>
- <?php $secresult = mysqli_query($link, "SELECT secondarytubes.categoryname FROM secondarytubes INNER JOIN primarytubes ON primaryid = primarytubes.id WHERE primaryid = '$primaryCatid' ");
- if (!$secresult)
- {
- $error = "It's all gone wrong";
- include $_SERVER['DOCUMENT_ROOT'] . '/error.html.php';
- exit ();
- }
- while ($secrow = mysqli_fetch_array($secresult))
- if (!$secrow)
- {
- $error = "It's all gone wrong";
- include $_SERVER['DOCUMENT_ROOT'] . '/error.html.php';
- exit ();
- }
- {
- $secCats[] = array('id' => $secrow['id'], 'categoryname' => $secrow['categoryname'] );
- }
- ?>
- <?php
- foreach ($secCats as $secCat):?>
- <label for="category">
- <input type="checkbox" name="" id=""/><?php echo $secCat['id']?></label>
- <?php endforeach; ?>
- <!--/*END OF LISTING THE SECONDARY CATEGORIES ASSOCIATED WITH EACH PRIMARY*/-->
- </ul>
- <?php endforeach; ?>
Add Comment
Please, Sign In to add comment