PHP Form Error

The following is a PHP script that sends mail, but once the mail is sent, a new browser window is opening, even if I omit the code: print “&status=mail sent - we will be in touch with you shortly&”…and I’m using Load Vars to send the variables. I’m the "send: method, because when I use “sendAndLoad” it doesn’t send anything.

Here is the complete script:

<?php
// list all vars to be expected from the movie
$vars = array(“name”, “email”, “cars”, “houses”);
// and import them into the script
foreach($vars as $var)
if(isset($_POST[$var]))
$$var = $_POST[$var];
else
$$var = ‘’;

// check variables
if(strlen($name) < 3)
die("&status=please enter a real name&");
if(!eregi(’^([a-z0-9._-])+@([^.]+.[^.]+)’, $email, $matched))
die("&status=please enter a correct email address&");
else if(!getmxrr($matched[2], $mxrr))
die("&status=your mail server does not seem to exist&");

// where to send it
// remove or configure one of the two code blocks
// otherwise your mail will be sent to tome@hotmail.com :slight_smile:

//**** this one for the selectable recipients ****
$recips = array(“support” => "tome@hotmail.com", “account” => "tome@hotmail.com");
$recip = $recips[$recip];
// if something went wrong, send to default address
if(empty($recip)) $recip = "tome@hotmail.com";
// ***** end selectable recipient ********

// ***** or one fixed recipient ******
$recip = "tome@hotmail.com";
//**** end fixed recipient *******

// build up message
// this code for any multiline text fields
$message = str_replace("\r", "
", $message);

/ /you can rearrange this - just do not add or remove quotes
$mailbody = "Contact form sent by
Name: $name
Email: $email
Cars: $cars
Houses: $houses


// send it off
// note - if you omit the last part, a few servers do not send mail at all,
// but most would show strange senders like nobody@server17.hostingcompany.com
mail($recip, “Register Form”, $mailbody, “From: tome@hotmail.com”);

// and tell visitor
//print “&status=mail sent - we will be in touch with you shortly&”;
?>

The problem with this script is that after the mail is sent, a browser window is opening even if I delete the last code. I don’t want any browser to open once send the mail. What do I need to change here? Thanks for any help.