Hello Experts;
What I would like to do is to open a new browser window on the client side to display a message without the current page becoming a blank page as the code below does now, the URL of this blank page is the below files path and name on the server. The below code does not currently display any message or open a window when it runs.
<?php
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PH
P_SELF']),
'/\\');
$SendTo = "";
if( isset($_POST['HOAPresident
']) )
{
$SendTo = "xxx@email.com,";
}
if( isset($_POST['WebMaster'])
)
{
$SendTo = "$SendTo webmaster@email.com,";
}
if( isset($_POST['PCMgrs']) )
{
$SendTo = "$SendTo yyy@email.com";
}
$SubDate = date( "l M j, Y G:i:s" ) . " ";
$From = $_POST['Name'];
$Email = $_POST['EmailAdd'];
$Subject = $_POST['Subject'];
$Message = $_POST['Message'];
// Send e-mail out submitted from ContactUs web page
if( mail($SendTo, $Subject, "Submitted on: $SubDate \nFrom $From \nE-mail: $Email\n\n$Message") )
{
// Write sent message to a file
if( $fp = fopen('ContactUsData.txt',
'ab') )
{
fwrite( $fp, "\nContact Us Message --------------------------
---\n");
fwrite( $fp, "Submitted on: $SubDate \nFrom $From \nE-mail: $Email\n\n$MailInfo");
fclose( $fp );
}
// Would like to open a new browser window on client side just big enough to
// display a small message without moving off the page that got me here
exit;
}
else
{
// No Email was sent for this message
// Write that was not sent because of an error to a file
if( $fp = fopen('ContactUsDataNoEmai
lSent.txt'
, 'ab') )
{
fwrite( $fp, "\nContact Us Message --------------------------
---\n");
fwrite( $fp, "Submitted on: $SubDate \nFrom $From \nE-mail: $Email\n\n$MailInfo");
fclose( $fp );
}
// Would like to open a new browser window on client side just big enough to
// display a small message without moving off the page that got me here
exit;
}
?>
Thank you for any help you can give.
Fernando
Start Free Trial