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 8476845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:17:30+00:00 2026-06-10T18:17:30+00:00

I have a strange problem. Situation: I have a form with the method ‘post’.

  • 0

I have a strange problem.

Situation:
I have a form with the method ‘post’.
Inside that form I have 1 checkbox and a submit button.
When i press the submit button an if statement will catch wether the post var is isset.

Problem:
When i press the submit button, it randomly doesn’t work.
So I press it now and it works or it won’t.

Here is the code I use to catch the post

if ( isset ( $_POST['mail_subscribe'] )  ) {
    //My code here
}

And here is the code from the form (I’m using smarty)

<form action="/my/url.html" method="post">
    <input type="checkbox" name="mail_subscribe" class="mail_subscribe" id="{$var.graph1.ID}" {if $var.mailing == 1}checked="checked" value="0"{else}value="1"{/if} />
    <br /><br />
    <input type="submit" value="save" id="mailing_submit"/>
</form>

When i submit this form sometimes it works and more often it doesn’t.
If you guys need more information let me know.
I’ll update the question asap.

ANSWER

I found the answer to my problem.
Thank you @RobertMaysJr for that.

When a checkbox is not checked, and it is the only field inside the form, the form will never submit.

Now that I know that I’m changing the way I’ll be doing this 🙂

  • 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-10T18:17:31+00:00Added an answer on June 10, 2026 at 6:17 pm

    it needs to always be value=”1″ – if the checkbox is not checked then it won’t be submitted at all by the browser

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Very simple situation... very strange problem. I have a retained iVar NSMutableArray that I
I have the next very strange situation and problem: .NET 4.0 application for diagram
I have a strange problem getting the color of the point that was touched.
I have a strange situation which appears to indicate a GORM cacheing problem //begin
I have a very strange situation. Basically I have code that uses a decryptor
Here's my situation: i have a dialog form that inserts some data on my
I am having a kinda strange problem. Here is the situation. I have a
Trying my hand with jQuery. I have this strange situation that i wish to
I've got a strange problem here. Assume that I have a class with some
I have a strange problem with Jquery Ajax with the following code. Situation 1:

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.