<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?PHP
	session_start(); // Initialize session data
	if(! isset($_SESSION['useBT'])){ #If started in the middle go to 1st page
		header("Location: index.php");
	}

	if($_SERVER['REQUEST_METHOD'] == 'POST') {
		if(isset($_POST['country'])){ //Result selected
			$_SESSION['country'] = $_POST['country'];
		}
		if(isset($_POST['comment'])){ //Result selected
			$_SESSION['comment'] = $_POST['comment'];
			header("Location: pg8.php");
		}
	}
?>


<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link rel="stylesheet" type="text/css" href="css.css" />
<title>BitTorrent Search Engine Survey</title>
<style type="text/css">
.auto-style1 {
	text-align: center;
}
.auto-style2 {
	text-align: right;
}
.auto-style3 {
	text-align: center;
	font-size: small;
}
</style>

<script type="text/javascript">

function checkForm() //Check whether total is 20
{
	if (document.countryForm.elements["country"].value == "")
	{
		alert('Please indicate your country.');
		return false;
	}	
	return true;
}
</script>
</head>

<body>
<table style="width: 800px" align="center">
	<tr>
		<td>
			<h1 class="auto-style1">BitTorrent Search Engine/Site Survey&nbsp;</h1>
		</td>
	</tr>
	<tr>
		<td style="height: 21px"></td>
	</tr>
	<tr>
		<td>
		<form method="post" action="pg7.php" name="countryForm" onsubmit="return checkForm()">
			<p>In what <strong>country</strong> do you live (for classification 
			only)?</p>
			<input name="country" type="text" style="width:200px" maxlength="128"/><br />
			<p>Comments - anything that you would like to share about use of BitTorrent search engines</p>
			<input name="comment" type="text" style="width:600px" maxlength="255"/><br />
			<br />
			<div class="auto-style2">
			<input name="Next" type="submit" value="Next >>" /></div>
		</form>
		<p class="auto-style3">Progress 7/8</p>
		</td>
	</tr>
</table>
</body>

</html>
