<!DOCTYPE html>
<html id="en_us" lang="en">
<head>
<h1>Dataweavr</h1>
</head>
<body>
<?php
if (!isset($_POST['submit'])){
?>
<form method="post" action="dataweavr.php">
SAT score: <input type="text" name="satscore" /><br />
GPA: <input type="text" name="gpa" /><br />
Grade: <input type="text" name="grade" /><br />
AP Classes: <input type="text" name="AP classes" /><br />
<input type="submit" value="submit" />
</form>
<?php
} else {
$sat = $_POST['satscore'];
$gpa = $_POST['gpa'];
$grade = $_POST['grade'];
$ap = $_POST['ap'];
if ($sat >= '2100' && $gpa >= '4' && $grade == 'freshmen' && $ap >= '2'){
echo "Great job! This test worked!";
} elseif ($sat <= '2100' && $gpa <= '4' && $grade == 'sophmore' && $ap <= '2') {
echo "Terrible job! But this test still works!";
}
}
?>
//*
<?php
} else {
$sat = $_POST['satscore'];
if ($sat >= '2100'){
echo "Great score!";
} elseif ($sat <= '2000') {
echo "You need to retake the SAT!";
}
}
?>
<?php
$gpa = $_POST['gpa'];
if ($gpa >= '4') {
echo "Great GPA!";
} elseif ($gpa <= '4') {
echo "You need to get straight A's!";
}
?>
<?php
$grade = $_POST['grade'];
if ($grade == 'freshmen') {
echo "You're on track!";
}
?>
<?php
$ap = $_POST['ap'];
if ($ap >= '3') {
echo "You're a terrific Harvard candidate!";
}
?>
*//
</body>
</html>
This post has been edited by macosxnerd101: 07 October 2011 - 06:35 PM
Reason for edit:: Please use code tags

New Topic/Question
Reply



MultiQuote






|