Anonymous Anonymous - 1 month ago
297 0

No description

PHP

file1.php

$scores = fopen("allScore.txt", "r") or die("Unable to open file!");
			$all= fread($scores, file_get_contents("allScore.txt")); 
			//echo $all;
			
			//GRADING FOR GRAPHS
if($all >0 && $all <=13){
	$skinCondition = 'Mild';
	echo $all;
	/* //header("Location:skin.php?scorevalue=<?php echo $skinCondition ?>"); */
}
else if($all>13 && $all <=22){
	$skinCondition = 'Moderate';
	echo $all;
/* header("Location:skin.php?scorevalue=<?php echo $skinCondition ?>"); */
}
else if($all>22 && $all<=28){
	$skinCondition = 'Severe';
	echo $all;
		echo $skinCondition;

/* 	header("Location:skin.php?scorevalue=<?php echo $skinCondition ?>"); */
}
else if ($all > 28){
	$skinCondition = 'Very Severe';
	echo $all;
	echo $skinCondition;
	/* header("Location:skin.php?scorevalue=<?php echo $skinCondition ?>"); */
}
	else 
	{ echo "Error in Result Display"; } 

$_SESSION["skinCond"] = $skinCondition; // i want this session to go to next page -_- ... and 
$_SESSION["score"] = $all; //this too