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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:15:03+00:00 2026-06-01T09:15:03+00:00

I have a system for users to apply for driving permit. However, while coding

  • 0

I have a system for users to apply for driving permit. However, while coding this system, I faced some problem, and the problem I am facing now is that I do not know how can I pass a value from a form from the application pass the processor page ,pass the medical questionnaire page, and lastly to be use in the medical processor page. In my example,

The Overview Layout:

apply2.php > apply_now.php >medical_question.php >medical_question_now.php>success.php

The main question:

What is the best way to transfer a $selectedPermit=$_POST['cat']; value from apply_now.php to medical_question_now.php??

The Explanation:

I have a checkbox form in apply2.php and upon clicking submit, it will link to apply_now.php.

In apply_now.php (php processor page), I was able to retrieve the value selected on the check box and do some processing here. eg. If user have not completed a medical questionnaire in the past 3 years, it will bring them to the medical questionnaire page without inserting any data into the database. If they did the medical questionnaire before then it will go straight to the success page.

In the medical questionnaire, there are 23 questions and each answer will be stored in the database via the medical_questionnair_now.php page.

medical_question_now.php (a php processor page) consists of query to insert the medical questionnaire answers into the database, however, I would like to insert the value that was retrieved from the check box in apply2.php.

Success.php is just a page to tell them congrats.

My current idea:
I think there is 2 way i could bring the data over.

  1. Combine apply_now.php with medical_question.php together.

  2. Use hidden input which means the processor page must all be expose to the users.

  3. After some research, I found out that SESSION can help me achieve it but anyone have any idea how I can use SESSION to do it? (can give me rough explanation for SESSION so I can try it out)

I hope to stick with php for better understanding purpose, but if you guys think there is a better javascript() that can help which is easily understandable, please guide me…I want to learn new things. Thanks

Another Question

Another question I would like to ask is if on my php processor page, I would like to replace the echo with alert(); can i go this:

if($missing1=='1' or $missing2=='1')
        {
            echo '<script>alert("Sorry. You did have not met the Pre-Requisites for '.$permit .'");</script>';
            header ('Location:s_apply2.php');
        }

instead of this:

if($missing1=='1' or $missing2=='1')
        {
            echo"Did not meet pre-requisites for $permit";
        }

Thank You so Much for your help…I have learnt alot from here. Thanks Thanks 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-01T09:15:04+00:00Added an answer on June 1, 2026 at 9:15 am

    Using Session

    session_start();
    $selectedPermit = $_POST['cat'];
    $_SESSION['selectedPermit'] = $selectedPermit;
    

    On another page use:

    session_start();
    echo $_SESSION['selectedPermit'];
    

    Javascript question:

    if($missing1=='1' or $missing2=='1')
        {
            echo '<script>alert("Sorry. You did have not met the Pre-Requisites for '.$permit .'");\n";
            echo 'location.href="s_apply2.php";</script>';
           // header ('Location:s_apply2.php'); use javascript instead of header function
    
        }
    

    Regards

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

Sidebar

Related Questions

I never seemed to have this problem while doing Rails work in Linux, but
I have a system where registered users can vote up/vote down comments for a
Imagine for a moment that I have a system that allows users to take
I have a user system set up in a 'users' table, and I have
I have a notification system on my website where users will be notified of
I have two types of users for my system, normal human users with a
I have a simple file-system-ed-login (not mysql) just to track number of users who
I'm looking content management system that would have features similar to stackoverflow: Users can
I have a requirement to allow users in a content management system to create
We have some corporate intranet users using a WinForms app to work on 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.