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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:10:10+00:00 2026-06-09T12:10:10+00:00

So i am trying to recieve a value after a form is submitted to

  • 0

So i am trying to recieve a value after a form is submitted to see if checkboxes where selected and if they wernt values would be changed in a file and another file would grab it and check to see if a value was set to display a “you need to select checkbox” message

here is code for the checkboxes——————-

include 'checkvalidation.php';



            CODE

<form action="insert.php" method="post">

            <input type="checkbox" value"On" name="only-thisform"/>I will complete the insurance verification form only. 
            <?php 
             echo $setError;
            if ($setError == 1){

                echo "please Check box before continuing.";
            }
             ?>
            <br>
            <br>

            <input type="checkbox"  value="On" name="approval" id="approval"/>I agree to authorize PCG Protects, LLC to receive a certificate of liability and or to be added as an additional interest on my personal auto policy, whichever accommodates my Auto Insurance Carriers standard practice, so they can monitor the active status of my personal auto policy, on behalf of my employer.
             <?php 

             if ($setError == 1){
                echo "please Check box before continuing.";
             }

             ?>

            <br>
            <br>
  CODE

    </form>

Here is insert file

include 'checkvalidation.php';

CODE
    /***************************************VALIDATE CHECK BOXES ARE CHECKED *********************************************************/

            $ch1 = 'unchecked';
            $ch2 = 'unchecked';
        //  print_r("testing ch1 : $ch1");
            if(isset($_POST['only-thisform']))  {

                $ch1 = 'Check';
                //if ($setChecker != 1)
                $setError= 0;
                //print_r("testing ch1: $ch1");

            }
            if ($ch1 !='Check' ){

            $setError = 1;
            header("Location: test.php");
            exit;

        }
            if (isset($_POST['approval'])) {
                //$setChecker = 1;
                $ch2 = 'Check';
                $setError= 0;
                //print_r("testing  ch2: $ch2");
            }
             if ($ch2 != 'Check' ){

            $setError = 1;
            header("Location: test.php");
            exit;

        }
/***************************************************************************************************************************************/           

          CODE

Here is checkvalidation file ——————-

<?php 




             $setError = 0;


            echo $setError; 



?>

So pretty much i am trying to get a value that is changed during a form submission proccess so i can display a message as to why the form was not submitted

UPDATED ________________ $setError is always 0

  • 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-09T12:10:11+00:00Added an answer on June 9, 2026 at 12:10 pm

    here

    $setError = 1;
    header("Location: test.php");
    

    $setError is not transport to test.php,you should find a way(get or post)to send it to test.php

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

Sidebar

Related Questions

just been trying to recieve the session value from multiple jquery ajax requests on
Trying to get a centered popup to display after a set value of time,
I am trying to receive a json object back from php after sending data
I am trying to make a query to sqlite android to see for example
So I'm trying to send several iterations of a barcode file to a device.
I am trying to receive the original CSS width value of an object using
I'm trying to learn UDP, and make a simple file transferring server and client.
I am trying to convert a byte value to binary for data transfer. Basically,
I am trying to receive an image from the Android Gallery via an ACTION_SEND
I am trying to receive the url image and post the image into base64

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.