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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:08:25+00:00 2026-06-18T08:08:25+00:00

I am relatively new to the form, so sorry if I make a mistake

  • 0

I am relatively new to the form, so sorry if I make a mistake in posting.

<?php

require_once("login/include/membersite_config.php");

if(!$fgmembersite->CheckLogin())
{
    $fgmembersite->RedirectToURL("./login/login.php");
    exit;
}

include 'menu.php';

$is_student = $_POST["is_student"];

//echo "<br/> student $is_student <br/>";

?>

<html>
<head>
<title>Seat Selection</title>
<link href="xampp.css" rel="stylesheet" type="text/css">
</head>

<body>
<h1>
<?php
if ($is_student == "no") {
  $student = FALSE;
  $_SESSION['student'] = FALSE;
} elseif ($is_student == "yes") {
  $student = TRUE;
  $_SESSION['student'] = TRUE;
} else {
  echo "Please select Student or Parent before making reservation.";
  die();
}

if ($student)
  echo "Student Reservation";
else
  echo "Parent Reservation";

?>
</h1>
<h2>Step 1 of 2: Select Seats</h2>

<table>

<?php if ($student) { ?>
  <form name="seats" action="confirms.php" method="POST">
<?php } else { ?>
  <form name="seats" action="confirm.php" method="POST">
<?php } ?>

<?php


        $all_seats = $fgmembersite->GetAllSeats($student); // it's a 2 dimensional array $list[row][col]
                                               // the value of which is another array with seatid and whether it's
                                               // filled or not
        $reserved_seats = $fgmembersite->GetAllReservedSeats($student);

        //var_dump($reserved_seats);

        // merge the reserved seats into all seats
        foreach ($reserved_seats as $r => $arr) {
          //echo "R =$r <br/>";
          //var_dump($arr);
          foreach($arr as $c => $seatid) {
             //echo "R = $r, C = $c, S = $seatid><br/>";
            $all_seats[$r][$c] = array(seatid => $seatid, filled => TRUE);
          }
        }

        foreach ($all_seats as $r => $c) {
          echo $r. ">";
          foreach ($c as $value) {
            if ($value['filled']) {
              echo "x";
               } else {
              echo "<input type=\"checkbox\" name=\"seats[]\" value=\"$value[seatid]\"/>";
            }
          }
          echo "<br/>";
        }
?>

<input type="Submit" name="SeatsSelected" value="Select Seats">
</form>
</table>

</body>
</html>

I am trying to use the boolean value from $student to determine which confirmation page it goes to, but when I load the file the code is in (seats.php), it doesn’t load. It acts like the page is missing from the web directory. Any idea what’s up? This might just be my bad coding.

  • 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-18T08:08:26+00:00Added an answer on June 18, 2026 at 8:08 am

    Try this :

    <?php if ($student) { ?>
      <form name="seats" action="confirm.php" method="POST"> 
    <?php } else { ?>
      <form name="seats" action="confirms.php" method="POST"> 
    <?php } ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm relatively new to GUI building. I want to make a GUI with a
Relatively new to C#; hopefully I'm just overlooking something simple. I have a form
I am relatively new to Javascript so I'm hoping this is a simple mistake.
So Im relatively new to PHP from ASP. And After converting alot of ASP
I am relatively new to ASP.NET & C# I am creating a basic form
I'm relatively new to C. I've come across a form of function syntax I've
Relatively new to PHP here, but here's where I'm at: I have a simple
I am relatively new to PHP, so my apologies if the answer is trivial.
I am relatively new to python and Django. The form is displaying itself, but
I am relatively new with php and am in need of some help. I

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.