<!-- Start of HubSpot Embed Code --> <script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/8652703.js"></script> <!-- End of HubSpot Embed Code --> <?php ini_set('display_errors', 'Off'); $nome = $_POST['Nome'];$email = $_POST['email'];$Telefone = $_POST['Telefone'];$msg = $_POST['msg'];$ipaddress = $_POST['ip']; $origin = $_POST['origin']; $dbuser = "ptgolden_diogo"; $dbpass = "DiogoCamara2017!"; $dbname = "ptgolden_contacts"; $from = "Visa By Investment <[email protected]>"; $to = "[email protected]"; $subject = ucwords(strtolower($nome)).' Formulário Completo - Contacto Inglês ( VI 1 )'; $message = '<p>Dear All, </p> <p><strong>'.$nome.'</strong> needs help and needs you to reply to</p> <p>Details:</p> <p><strong>Name</strong>: '.$nome.'<br /> <strong>Email</strong>: '. strtolower($email).'<br /> <strong>Phone</strong>: '.$Telefone.'<br /> <strong>Message</strong>: '.nl2br($msg).'<br /> <strong>IP</strong>: '.strtolower($ipaddress).'<br /> <br /> <strong>D</p>'; $notific_to = "[email protected]"; $notific_subject = ucwords(strtolower($email)).' - New request for information English'; $notific_message = '<p>Hello.</p><p>A new request for information just entered the data base'.$db_nome.'.</p><p>Nome -&gt; '.$nome.'.<br>telefone -&gt; '.$Telefone.'.<br>Email &nbsp;-&gt; '.strtolower($email).'.<br>Ip &nbsp;-&gt;<a href="https://check-host.net/ip-info?host='.strtolower($ipaddress).'">'.strtolower($ipaddress).'<br></p><br>Mensagem &nbsp;-&gt; '.nl2br($msg).'.<br></p>'; $dbhost = "localhost";$conn = @ mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');@ mysql_select_db($dbname);$todayDate = date("Y-m-d g:i a");$currentTime = time($todayDate);$hours_to_incriase = 7;$timeAfterOneHour = $currentTime+(60*$hours_to_incriase)*60; //infos (id, nome, email, telefone, msg, data) $query2 = @ mysql_query("INSERT INTO `ptgolden_contacts`.`infos` (`nome` ,`email` ,`telefone` ,`msg` ,`data`, `origin`,`ip`) VALUES ('".$nome."', '".$email."', '".$Telefone."', '".$msg."', '".date("Y-m-d H:i:s",$timeAfterOneHour)."','".$origin."', '".$ip."');"); $xheaders = "";$xheaders .= "From: $from\n";$xheaders .= "X-Sender: <$from>\n";$xheaders .= "X-Mailer: PHP\n";$xheaders .= "X-Priority: 1\n";$xheaders .= "Content-Type:text/html; charset=\"iso-8859-1\"\n";mail($to, $subject, $message, $xheaders,'-f [email protected]');mail($notific_to, $notific_subject, $notific_message, $xheaders,'-f [email protected]');header('location: from_info_ok.php'); ?>