I keep getting this error:
 Notice: Undefined index: email in C:\wamp\www\orb\launchPage\newsletter.php on line 89
I know I'm missing something simple here but just can't seem to see it. 
This is the code from newsletter.php:
<?php
$newsletterFileName = "interested.txt";
function GetField($input) {
    $input=strip_tags($input);
    $input=str_replace("<","<",$input);
    $input=str_replace(">",">",$input);
    $input=str_replace("#","%23",$input);
    $input=str_replace("'","`",$input);
    $input=str_replace(";","%3B",$input);
    $input=str_replace("script","",$input);
    $input=str_replace("%3c","",$input);
    $input=str_replace("%3e","",$input);
    $input=trim($input);
    return $input;
} 
/**Validate an email address.
Provide email address (raw input)
Returns true if the email address has the email 
address format and the domain exists.
*/
function validEmail($email)
{
   $isValid = true;
   $atIndex = strrpos($email, "@");
   if (is_bool($atIndex) && !$atIndex)
   {
      $isValid = false;
   }
   else
   {
      $domain = substr($email, $atIndex+1);
      $local = substr($email, 0, $atIndex);
      $localLen = strlen($local);
      $domainLen = strlen($domain);
      if ($localLen < 1 || $localLen > 64)
      {
         // local part length exceeded
         $isValid = false;
      }
      else if ($domainLen < 1 || $domainLen > 255)
      {
         // domain part length exceeded
         $isValid = false;
      }
      else if ($local[0] == '.' || $local[$localLen-1] == '.')
      {
         // local part starts or ends with '.'
         $isValid = false;
      }
      else if (preg_match('/\\.\\./', $local))
      {
         // local part has two consecutive dots
         $isValid = false;
      }
      else if (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain))
      {
         // character not valid in domain part
         $isValid = false;
      }
      else if (preg_match('/\\.\\./', $domain))
      {
         // domain part has two consecutive dots
         $isValid = false;
      }
      else if
(!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/',
                 str_replace("\\\\","",$local)))
      {
         // character not valid in local part unless 
         // local part is quoted
         if (!preg_match('/^"(\\\\"|[^"])+"$/',
             str_replace("\\\\","",$local)))
         {
            $isValid = false;
         }
      }
   }
   return $isValid;
}
$email 	= GetField($_GET['email']);
$pass 	= validEmail($email);
if ($pass) {
	$f = fopen($newsletterFileName, 'a+');
	$read = fread($f,filesize($newsletterFileName));
	If (strstr($read,"@")) {
		$delimiter = ";";
	}
	if (strstr($read,$email)) { 
		echo 3;
	} else {
		fwrite($f, $delimiter . $email);
		echo 1;
	}
	fclose($f);
} else {
	echo 2;
}
?>
Line 89 is this one:
$email 	= GetField($_GET['email']);
Thanks in advance for any help.
			
			
													Any ideas? [SOLVED]
- 
				quickdraw69
- Posts: 4
- Joined: Mon Mar 19, 2012 7:43 pm
Any ideas? [SOLVED]
					Last edited by quickdraw69 on Fri Apr 06, 2012 11:43 am, edited 1 time in total.
									
			
						
										
						- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Any ideas?
check your url is email even defined? as this shows it is not...
			
			
									
						
										
						- 
				quickdraw69
- Posts: 4
- Joined: Mon Mar 19, 2012 7:43 pm
Re: Any ideas? [SOLVED]
AAAHHHHHH Thanks Halls! I knew it was going to be something simple I just wasn't seeing.
			
			
									
						
										
						