PHP Code:
 /*This is the scripting section for the e-mail collection box.*/
	  class CollectEmail
		$email = " ";
		$connection = new PDO('mysql:host=worldreviewgroupcom.*****;dbname=emailcollection' , "worldreviewgroup" , "*******");
		if (!$connection){
			die('Could not connect: ' . mysql_error());
		function showWindowAndValidate()
			echo'	<p>Join the Mailing List!</p>
					<div id="activeemailbox">
					<form name="form1" method="post" action="">
					  <label for="confirmemail">Confirm Your E-mail:<span style="color:red">*</span></label>          
					  <input type="text" name="confirmemail" value="" maxlength="60"/><br />
					  <label for="name">Enter Your Name:</label>
					  <input type="text" name="name" value="" maxlength="60" /><br />
					  <label for="age">Enter Your Age:</label>
					  <input type="text" name="age" value="" maxlength="3" /><br />
					  <label for="country">Select Your Country:
					  <select name="country">
						 <option selected="selected">United States</option>
						 <option>United Kingdom</option>
						 <option>Somewhere Else</option>
					  </select><br />
						  <input type="submit" value="Sign Me Up!" onclick="" />
			writeUserToDatabase($email, $name, $age, $country, $category);
		if (isset($_POST["go"]){
			$email = $_POST["go"];
			if (isItAValidEmail($email)){
			} else {
		} else {
		/*test the e-mail address submission for valid entry */
		function Boolean isItAValidEmail($email){
			if(!filter_var($email, FILTER_VALIDATE_EMAIL)) {
			  return false;
			} else {
			  return true;
		function invalidEntry()
			return echo'<div id="activeemailbox"><p id="error">You didn\'t enter a valid email, silly!</p><input type="submit" value="Go Back" 		  onclick="goBack()"></div>';
		function generateRandom()
		function goBack()
		function writeUserToDatabase($email, $name, $age, $country, $category)
			$statement = $connection -> prepare("INSERT INTO emailcollection (email, name, age, country, category) VALUES (:email, :name, :age, :country, :category)");
			$statement -> bindParam(':email', $email)
			$statement -> bindParam(':name', $name);
			$statement -> bindParam(':age', $age);
			$statement -> bindParam(':country', $country);
			$statement -> bindParam(':category', $category);
			$statement -> execute();
		$connection = null;
	//end e-mail box scripting section
There is apparently a problem with the $email variable, it doesn't like the braces in many spots. What have I done incorrectly thus far?