File "submit_info.php"

Full Path: /home/ptgoldenvisa/public_html/Dubai/Dubaiold/submit_info.php
File size: 2.05 KB
MIME-type: text/x-php
Charset: utf-8

<?php
$nome = $_POST['Nome'];$email = $_POST['email'];$Telefone = $_POST['Telefone'];$msg = $_POST['msg'];

	$dbuser = "ptgolden_visa";
	$dbpass = "PortugalVistos2013$";
	$dbname = "ptgolden_visa";

	$from = "PTGoldenVisa DUBAI MEETINGS <[email protected]>";
	$to = "[email protected]";
	$subject = ucwords(strtolower($nome)).'Message English MEETING DUBAI ( DUBAI )';

	$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 />
	<br />
	<strong>D</p>';
	
	$notific_to = '[email protected]';
	$notific_subject = ucwords(strtolower($email)).' - Novo PEDIDO DE MEETING DUBAI';
	$notific_message = '<p>Olá.</p><p>Acabou de ser inserido mais um registo na base de dados '.$db_nome.'.</p><p>Nome -&gt; '.$nome.'.<br>telefone -&gt; '.$Telefone.'.<br>Email &nbsp;-&gt; '.strtolower($email).'.<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_visa`.`infos` (`nome` ,`email` ,`telefone` ,`msg` ,`data`) VALUES ('".$nome."', '".$email."', '".$Telefone."', '".$msg."', '".date("Y-m-d H:i:s",$timeAfterOneHour)."' );");
$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');
?>