<!DOCTYPE>
<html>
<head>
<title>
Zodiac
</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="zodiac.js"></script>
</head>
<body>
<h1>What is your Zodiac Sign?</h1>
<p>Enter your name and birthdate below to discover your zodiac sign!</p>
<form action="zodiac.php" method="get">
<?php
//ini_set("display_errors", 1);
function findSign($name, $month, $date){
$intDate = intval($date);
switch($month){
case "January":
echo "January";
if($intDate <= 19){
echo "$name are a Capricorn";
}
else{
echo "$name are a Aquarius";
}
break;
default:
break;
}
}
if(isset($_POST['submit'])){
$name = $_POST['name'];
$month = $_POST['month'];
$day = $_POST['day'];
$year = $_POST['year'];
echo "hi";
}
?>
<input type="text" name="name" placeholder="Name" value="<?php echo $name; ?>" />
<br />
<?php
//variables for year
$startYear = 1950;
$endYear = 2014;
//making drop down menu for year
echo '<select name="year" id="year">';
echo '<option value="">--Birth Year--</option>';
for(; $startYear <= $endYear; $startYear++){
echo '<option value="' . $startYear . '">' . $startYear . '</option>';
}
echo '</select>';
//array list of strings for the months
$month = array(
"--Birth Month--",
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
);
//making a drop down menu for months
echo '<select name="month" id="month">';
//echo '<option value="">--Birth Month--</option>';
for($i = 0; $i < count($month); $i++){
echo '<option value="' . $month[$i] . '">' . $month[$i] . '</option>';
}
echo '</select>';
//variables for the day
$startDay = 1;
$endDay = 31;
//making drop down menu for day
echo '<select name="day" id="day">';
echo '<option value="">--Birth Day--</option>';
for(; $startDay <= $endDay; $startDay++){
echo '<option value="' . $startDay;
if($day == $startDay){
echo 'checked="checked"';
}
echo '">' . $startDay . '</option>';
}
echo '</select>';
?>
<br />
<input type="submit" value="Submit" name="submit" />
<?php
}
?>
</form>
</body>
</html>
- Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.32
- Parse error: syntax error, unexpected '}' in /in/oLOmQ on line 110
Process exited with code 255. - Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
- Parse error: parse error, unexpected '}' in /in/oLOmQ on line 110
Process exited with code 255. - Output for 4.3.2 - 4.3.4
- Parse error: parse error in /in/oLOmQ on line 110
Process exited with code 255.
preferences:
199.43 ms | 1395 KiB | 123 Q