PHP minor project for Student Result Management System

PHP minor project for Student Result Management System

PHP Students Result Management System – In this task, we will oversee the understudies result in the executive’s framework.

​This article/venture is an issue-based inquiry in which we will get subtleties of an understudy and will create an outcome.

Right now, you need to make a structure in HTML to get the accompanying subtleties of understudies:

  • School Name
  • Understudy Name
  • Father’s Name
  • DOB
  • Sex
  • Hindi Marks
  • English Marks
  • Maths Marks
  • Material science Marks
  • Science Marks

Result ought to contain:

  • A logo of the focal leading group of optional instruction.
  • A comment field to offer comment to each subject as per the following conditions:
    • In the event that imprints under 35 → “*” comment demonstrates come up short
    • On the off chance that imprints more noteworthy 79 → “D” comment demonstrates differentiation
  • Else → “- ” comment demonstrates nothing
  • You have to show conclusive outcome beneath the Result as indicated by the following condition:
  • In the event that an understudy flops in a single subject Result ought to resemble this → Compartment in Subject name
  • In the event that an understudy flops in more than one subject Result ought to resemble this → Fail
  • Else Result ought to resemble this → Pass

We should begin to take care of this issue…

To make your structure make a record named “StudentDetails.php” and compose underneath code:

<html>
	<form action="Result.php">

		<table>
			<caption>STUDENT MARKSHEET FORM</caption>
			<tr>
				<td>School Name</td>
				<td><input type=text name=sn size=30></td>
			</tr>

			<tr>
				<td>Student Name</td>
				<td><input type=text name=stn size=30></td>
			</tr>

			<tr>
				<td>Father's Name</td>
				<td><input type=text name=fn size=30></td>
			</tr>

			<tr>
				<td>Dob</td>
				<td><input type=text name=dob size=30></td>
			</tr>

			<tr>
				<td>Gender</td>
				<td><input type=radio name=gen size=30 value="Male">Male<input type=radio name=gen size=30 value="Female">Female</td>
			</tr>

			<tr>
				<td>Hindi marks</td>
				<td><input type=text name=hin size=30></td>
			</tr>

			<tr>
				<td>English marks</td>
				<td><input type=text name=eng size=30></td>
			</tr>

			<tr>
				<td>Maths marks</td>
				<td><input type=text name=math size=30></td>
			</tr>

			<tr>
				<td>Physics marks</td>
				<td><input type=text name=phy size=30></td>
			</tr>

			<tr>
				<td>Chemistry marks</td>
				<td><input type=text name=chem size=30></td>
			</tr>

			<tr>
				<td><input type=submit></td>
				<td><input type=reset></td>
			</tr>
		</table>
		
	</form>
</html>

Run your record and you should see something like this:

PHP minor project for Student Result Management System

Presently your structure is prepared! It’s time to demonstrate the outcome to understudy. To show the outcome make a document named “Result.php”.Add the following code to it:

<html>
<?php
	$sn=$_GET['sn'];
	$stn=$_GET['stn'];
	$fn=$_GET['fn'];
	$dob=$_GET['dob'];
	$gender=$_GET['gen'];
	$hindi=$_GET['hin'];
	$english=$_GET['eng'];
	$maths=$_GET['math'];
	$physics=$_GET['phy'];
	$chemistry=$_GET['chem'];
	$total=$hindi+$english+$maths+$physics+$chemistry;
	$remark1=0;
	$remark2=0;
	$remark3=0;
	$remark4=0;
	$remark5=0;
	$count=0;
	$s="a";
	$gen='';
	$min=35;
	$max=100;
	$hin='Hindi';
	$eng='English';
	$math='Maths';
	$phy='Physics';
	$chem='Chemistry';

	if($gender=="Male"){
		$gen="S/o";
	}else if($gender=="Female"){
		$gen="D/o";
	}
	if($hindi<35){
		$remark1="<font color='red'>*</font>";
		$count++;
		$s=$s.' and '.$hin;
	}else if($hindi>79){
		$remark1="<font color='green'>D</font>";
	}else{
		$remark1='-';
	}
	
	if($english<35){
		$remark2="<font color='red'>*</font>";
		$count++;
		$s=$s.' and '.$eng;
	}else if($english>79){
		$remark2="<font color='green'>D</font>";
	}else{
		$remark2='-';
	}

	if($maths<35){
		$remark3="<font color='red'>*</font>";
		$count++;
		$s=$s.' and '.$math;
	}else if($maths>79){
		$remark3="<font color='green'>D</font>";
	}else{
		$remark3='-';
	}

	if($physics<35){
		$remark4="<font color='red'>*</font>";
		$count++;
		$s=$s.' and '.$phy;
	}else if($physics>79){
		$remark4="<font color='green'>D</font>";
	}else{
		$remark4='-';
	}
	
	if($chemistry<35){
		$remark5="<font color='red'>*</font>";
		$count++;
		$s=$s.' and '.$chem;
	}else if($chemistry>79){
		$remark5="<font color='green'>D</font>";
	}else{
		$remark5='-';
	}

	$s=str_replace('a and', '', $s);
	if($count>2){
		$s="Fail";
	}else if($count==0){
		$s="Pass";
	}else if($count<=2){
		$s="Compartment in ".' '.$s;
	}
?>

<center>
	<table border=1>
		<tr>
		<td>
			<table  width=100%>
			<tr>
				<td>
					<img src='images.jpg' width=120 height=120>
				</td>
				<td>
					<b><font size='5'>CENTRAL BOARD OF HIGHER EDUCATION</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b><br><br>
					<font size='4' color='grey'><b><?php  echo "$sn"; ?></b></font>
				</td>
			</tr>
			</table>
		</td>
		</tr>
		<tr>
		<td>
			<table width=100%>
				<tr><td><font size='4'><?php echo "$stn"; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo "$gen";?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo" Mr.$fn";?></font></td></tr>
				<tr><td><font size='4'><?php echo "$dob"?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo"$gender";?></font></td></tr>
			</table>
		</td>
		</tr>
		<tr>
		<td>
			<table border=1 width=100%>
				<tr><th><i>Subject code</i></th><th><i>Subject name</i></th><th><i>Min marks</i></th><th><i>Max marks</i></th><th><i>Marks obtained</i></th><th><i>Remark</i></th></tr>
				<tr><td>101</td><td>Hindi</td><td>35</td><td>100</td><td><?php echo "$hindi"; ?></td><td><?php echo "$remark1"; ?></td></tr>
				<tr><td>102</td><td>English</td><td>35</td><td>100</td><td><?php echo "$english"; ?></td><td><?php echo "$remark2"; ?></td></tr>
				<tr><td>103</td><td>Maths</td><td>35</td><td>100</td><td><?php echo "$maths"; ?></td><td><?php echo "$remark3"; ?></td></tr>
				<tr><td>104</td><td>Physics</td><td>35</td><td>100</td><td><?php echo "$physics"; ?></td><td><?php echo "$remark4"; ?></td></tr>
				<tr><td>105</td><td>Chemistry</td><td>35</td><td>100</td><td><?php echo "$chemistry"; ?></td><td><?php echo "$remark5"; ?></td></tr>
				<tr><td></td><td></td><td><b>Total</b></td><td><b>400</b></td><td><b><?php echo "$total"; ?><b></td><td></td></tr>
			</table>
		</td>
		</tr>

		<tr>
		<td>
			<table>
				<tr><td><b><font size='4'>Result:&nbsp;&nbsp;&nbsp;&nbsp;<?php echo "$s"; ?></font></b></td></tr>
			</table>
		</td>
		</tr>
	</table>
</center>

</html>

To test this run your StudentDetails document and hit submit button, you should see your outcome like this:

PHP minor project for Student Result Management System

Recent Posts

error: Alert: Content is protected!!