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

  • Home
  • SEARCH
  • 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 7641355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:54:04+00:00 2026-05-31T08:54:04+00:00

So forgive this dumb question. I’m a music teacher, not a programmer. I am

  • 0

So forgive this dumb question. I’m a music teacher, not a programmer.

I am submitting a form. I have possibly checked checkboxes for “spoken languages”.

<input type="checkbox" id="speakEnglish" name="speakEnglish" value="yes"  />
<input type="checkbox" id="speakGerman" name="speakGerman" value="yes"  />

And then on form submit I have

$speakEnglish = $_POST['speakEnglish'];
$speakGerman = $_POST['speakGerman'];

And formulate my SQL query from that. It was submitting and INSERTing fine on my local host, but since uploading to a server I’m getting this when a checkbox is empty…

AN error occurred in the script '/home/berli/public_html/TEST/signup.php' on line 295: 
Undefined index: speakGerman

This confuses me .. though I understand whats going on.

But why was my form submitting with empty checkboxes before, and now it throws an error?
What is the normal way to handle this?

Something like..?

if(isset($_POST[checkboxVar]) { $SQLcheckboxVar = $_POST[checkboxVar]} };

I just don’t understand why empty checkboxes didn’t hang me up on local host, but now they do. I cant think of anything else I could have done to cause that and I certainly wasn’t testing for the checkbox variables before… but I have a SQL table full of INSERTed entries.

Is there some kind of difference on how this would work locally vs on a server?

  • 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-05-31T08:54:05+00:00Added an answer on May 31, 2026 at 8:54 am

    Your servers error reporting must show notices/warnings (not sure specifically which one that is).

    You are correct in saying that if(isset($_POST['checkboxVar'])) is all you would need to hide that error if you can’t change your php configuration (php.ini). This is what you need on your online server (usually /etc/php.ini):

    ;Show all errors, except for notices and coding standards warnings
    error_reporting = E_ALL & ~E_NOTICE
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am obj c n00b so forgive me if this is a dumb question,
I'm new to flex , so forgive me if this is a dumb question.
Forgive me if this is a repeat question. I've searched StackOverflow and did not
Forgive me if this might be a dumb question but, I'm in an assembly
I'm new to git so forgive me if this is a dumb question. I
I'm new to programming so please forgive me if this is a dumb question...
Please forgive me if this is a dumb question. I'm only a week into
Forgive this novice question (novice in Javascript!). In a html page I have a
Please forgive this simplistic iphone development question. I have written a web application in
Please forgive this stupid question. (I'm originally an ASP.NET programmer.) I'm trying to add

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.