Jump to content

cjkeane

Members
  • Content Count

    63
  • Joined

  • Last visited

Community Reputation

0 Neutral

About cjkeane

  • Rank
    Regular Member

Profile Information

  • Gender
    Not Telling
  1. Thanks for all the responses. I am close. I want to retain the check marks before the form is submitted. I have this so far. It retains the check marks, but it selects all check boxes right away. <p>Select the categories:<br /> <?php if (isset($_POST['categories'])) {$checked = 'checked'; } else { $checked = '';} while ($category = mysqli_fetch_array($categories)) { $categoryid = $category['id']; $categoryname = htmlspecialchars($c
  2. Here is the full script. The error reporting didn't help. <?php error_reporting(E_ALL); ini_set('display_errors', '1'); ob_start(); require_once('db.php'); require_once('auth.php'); require_once('functions.php'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>Bookings</title> <link rel="stylesheet" href="https://code.jquery.com/ui/
  3. Hi everyone, I need to retain the checkbox selections after the form is submitted, but I'm stuck and wondering if anyone can offer some assistance? Thank you. <?php $categories = mysqli_query($db,'SELECT id, category FROM category'); if (!$categories) { exit('<p>Unable to obtain category list from the database.</p>'); } // Check if there are any categories and if so, list them. if (mysqli_num_rows($categories) != 0){ echo '<p>Select the related categories:<br />'; while ($category = mysqli_fetch_array($categories
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.