Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8492871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:50:59+00:00 2026-06-10T22:50:59+00:00

I’m working on a from that sends a mass email to selected groups of

  • 0

I’m working on a from that sends a mass email to selected groups of participants (people registered for a program).

Form looks like this:

1) (checkbox) Program Name Start Date

2) (checkbox) Program Name Start Date

3) (checkbox) Program Name Start Date

4) (checkbox) Program Name Start Date

5) (checkbox) Program Name Start Date

Let’s say you check all of them, but one of them (number 3 for instance) doen’t have any participants registered for the program.

When the form is submitted, a MySQL error is thrown, and any program participants (in this case 4 & 5) won’t get an email sent to them, and the user submitting the form is none the wiser.

<form id="email_form" name="email_form" action="email_broadcast_test.php" method="get">
<input name="pid[]" type="checkbox" class="eventCodeCheck" value="<?php echo $row_programs['eventcode']; ?>"/>
<input type="submit" value="Send Email" class="ButtonDefault" />

So I need to figure out and more importantly, learn and understand how to check if the program is empty and throw an alert to notify the user and not submit the form.

Another idea I had was to be able to check if the program was empty on page load, and disable the check box.

OR,

Throw an alert when the checkbox is checked notifying the user it is empty.

Thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:51:00+00:00Added an answer on June 10, 2026 at 10:51 pm

    You should not display the checkbox… to do that you need to add a WHERE clause in your MySQL query to only get the programs where someone is actually registered.

    No sense in displaying a checkbox if you can’t use it.

    If you post your current query and a little about your db then I could help you better.

    Your query could be:

    SELECT eventcode, eventdesc, date_format(date, '%m/%d/%Y') as format_date 
    FROM camps_events WHERE reg_status!= 'Archived' 
    AND eventcode IN (SELECT DISTINCT eventcode FROM registrations) 
    ".getAllowedPrograms()." ORDER BY eventdesc";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.