[TABLE]
[TR]
[TD=“class: votecell”][/TD]
[TD=“class: postcell”] I´m having a problem in a complex form built in PHP.
The form and the process are in the same page, because it loads in bootstrap modal, and shows a result in the same page. When the form is submitted, it creates a voucher in PDF format with html2pdf, and also sends email to the client and two administrators.
The problem is that is sending no results from the form. It sends the email to administrators, the client doesnt recieve, with empty spaces. Doesnt get the name, number or email from the form.
Below its the process for the form to work.[/TD]
[/TR]
[/TABLE]
<?php
require_once(dirname(__FILE__).'/html2pdf/html2pdf.class.php');
?>
<?php
if(isset($_POST['email'])) {
// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = "one@email.com, second@email.com";
$email_client = $email;
$email_subject = "3Compare Booking";
function died($error) {
// your error code can go here
echo "We are very sorry, but there were error(s) found with the form you submitted.";
echo "These errors appear below.<br /><br />";
echo $error."<br /><br />";
echo "Please go back and fix these errors.<br /><br />";
die();
}
// validation expected data exists
if(!isset($_POST['name']) ||
!isset($_POST['email']) ||
!isset($_POST['number']) ||
!isset($_POST['optionsRadios']))
{
died('We are sorry, but there appears to be a problem with the form you submitted.');
$name = $_POST['name']; // required
$email = $_POST['email']; // required
$number = $_POST['number']; // required
$optionsAreas = $_POST['optionsAreas']; // not required
$optionsRadios = $_POST['optionsRadios']; // not required
$newsletter = $_POST['newsletter'];
$ref = $_POST['ref'];
}
$error_message = "";
$email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
if(!preg_match($email_exp,$email)) {
$error_message .= "The Email Address you entered does not appear to be valid.<br />";
}
$string_exp = "/^[A-Za-z .'-]+$/";
if(!preg_match($string_exp,$name)) {
$error_message .= 'The First Name you entered does not appear to be valid.<br />';
}
if(strlen($number) < 2) {
$error_message .= 'The Last Name you entered does not appear to be valid.<br />';
}
if(!preg_match($string_exp,$optionsRadios)) {
$error_message .= 'The Comments you entered do not appear to be valid.<br />';
}
if(!preg_match($string_exp,$newsletter)) {
$error_message .= 'The Comments you entered do not appear to be valid.<br />';
}
function clean_string($string) {
$bad = array("content-type","bcc:","to:","cc:","href");
return str_replace($bad,"",$string);
}
$datei = fopen("library/countlog.txt","r");
$count = fgets($datei,1000);
fclose($datei);
$ref="3COMPAREWLC".$count."-".date('ymd');
$numlink = '3COMPAREWLC'.$count.'-'.date('ymd');
$email_message ="<body style='background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;'>
<div style='background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;'>
<table cellspacing='0' cellpadding='0' border='0' height='100%' width='100%'>
<tr>
<td align='center' valign='top' style='padding:20px 0 20px 0'>
<!-- [ header starts here] -->
<table bgcolor='FFFFFF' cellspacing='0' cellpadding='10' border='0' width='650' style='border:1px solid #E0E0E0;'>
<tr>
<td valign='top'>
<a href='http://super8.pt/3compare/'><img src='http://super8.pt/3compare/library/images/3compare_logo.jpg' alt='3COMPARE' style='margin-bottom:10px;' border='0'/></a></td>
</tr>
<!-- [ middle starts here] -->
<tr>
<td valign='top'>
<h1 style='font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;'>New Reservation</h1>
<p style='font-size:12px; line-height:16px; margin:0 0 16px 0;'>A new reservation was made on the website 3COMPARE</p>
<p style='border:1px solid #E0E0E0; font-size:12px; line-height:16px; margin:0; padding:13px 18px; background:#f9f9f9;'>
Personal Info <br/>
<strong>Reference:</strong> ".clean_string($ref)."<br/>
<strong>Name:</strong> ".clean_string($name)."<br/>
<strong>Email:</strong> ".clean_string($email)."<br/>
<strong>Mobile Number:</strong> ".clean_string($number)."<br/>
<strong>Payment Method:</strong> ".clean_string($optionsRadios)."<br/>
<strong>Newsletter:</strong> ".clean_string($newsletter)."<p>
<p style='font-size:12px; line-height:16px; margin:0 0 8px 0;'>Laser Hair Loss Therapy:<br/>
30-minute session per week for three months, with 13 sessions in total.</p>
<p style='border:1px solid #E0E0E0; font-size:12px; line-height:16px; margin:0; padding:13px 18px; background:#f9f9f9;'>".$optionsAreas."</p>
<p style='font-size:12px; line-height:16px; margin:0;'></p>
<p style='border:1px solid #E0E0E0; font-size:12px; line-height:16px; margin:0; padding:13px 18px; background:#f9f9f9;'>
<a href='http://super8.pt/3compare/voucher/ticket".$numlink.".pdf'>Click here to download and print your voucher</a>
</p>
</td>
</tr>
<tr>
<td bgcolor='#EAEAEA' align='center' style='background:#EAEAEA; text-align:center;'><center><p style='font-size:12px; margin:0;'><strong>3COMPARE</strong></p></center></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>";
// create email headers
$headers = 'From: '.$email_from."
".
'Reply-To: '.$email_from."
" .
'X-Mailer: PHP/' . phpversion();
$headers = "MIME-Version: 1.0
";
$headers = "Content-Type: text/html; charset=utf-8
";
@mail($email_to, $email_subject, $email_message, $headers);
@mail($email_client, $email_subject, $email_message, $headers);
ob_start();
$num = '3COMPAREWLC'.$count.'-'.date('ymd');
$nom = $name;
$date = '2014/07/31';
?>
<style type="text/css">
<!--
div.zone { border: none; border-radius: 6mm; background: #FFFFFF; border-collapse: collapse; padding:3mm; font-size: 2.7mm;}
h1 { padding: 0; margin: 0; color: #DD0000; font-size: 7mm; }
h2 { padding: 0; margin: 0; color: #222222; font-size: 5mm; position: relative; }
-->
</style>
<page format="100x200" orientation="L" backcolor="#f0a804" style="font: arial;">
<div style="rotate: 90; position: absolute; width: 100mm; height: 4mm; left: 195mm; top: 0; font-style: italic; font-weight: normal; text-align: center; font-size: 2.5mm;">
This is your e-ticket to present at the Clinic
</div>
<table style="width: 99%;border: none;" cellspacing="4mm" cellpadding="0">
<tr>
<td colspan="2" style="width: 100%">
<div class="zone" style="height: 34mm;position: relative;font-size: 5mm;">
<div style="position: absolute; right: 3mm; top: 3mm; text-align: right; font-size: 4mm; ">
<b><?php echo $nom; ?></b><br>
</div>
<div style="position: absolute; right: 3mm; bottom: 3mm; text-align: right; font-size: 4mm; ">
<b>Weight Loss Clinic</b><br>
Reference : <b><?php echo $num; ?></b><br>
Booked at : <b><?php echo date('d/m/Y à H:i:s'); ?></b><br>
</div>
<h1>VOUCHER</h1>
<b>Valid until <?php echo $date; ?></b><br>
<img src="library/images/3compare_logo.jpg" width="233" height="65" alt="logo" style="margin-top: 3mm; margin-left: 20mm">
</div>
</td>
</tr>
<tr>
<td style="width: 25%;">
<div class="zone" style="height: 40mm;vertical-align: middle;text-align: left;">
<b><?php echo $optionsAreas; ?></b>
</div>
</td>
<td style="width: 75%">
<div class="zone" style="height: 40mm;vertical-align: middle; text-align: justify">
<b>Personal Info</b><br>
<strong>Name:</strong> <?php echo $name; ?><br/>
<strong>Email:</strong> <?php echo $email; ?><br/>
<strong>Mobile Number:</strong> <?php echo $number; ?><br/>
<strong>Payment Method:</strong> <?php echo $optionsRadios; ?><br/>
<p style="font-size:10px; line-height:12px; margin:0 0 8px 0;"><b>Laser Hair Loss Therapy:</b><br/>
30-minute session per week for three months, with 13 sessions in total.</p>
</div>
</td>
</tr>
</table>
</page>
<?php
$content = ob_get_clean();
// convert
try
{
$html2pdf = new HTML2PDF('P', 'A4', 'fr', true, 'UTF-8', 0);
$html2pdf->pdf->SetDisplayMode('fullpage');
$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
$html2pdf->Output('voucher/ticket'.$num.'.pdf','F');
}
catch(HTML2PDF_exception $e) {
echo $e;
exit;
}
?>
<!-- include your own success html here -->
<div class="container orange-bg">
<p><div class="alert alert-success">Thank you for booking at 3COMPARE. We will be in touch with you very soon. <a class="btn btn-warning btn-shadow" href="<?php echo 'voucher/ticket'.$num.'.pdf'?>"><strong>Download your Voucher</strong> <i class="fa fa-arrow-circle-down"></i></a></div></p>
</div>
<?php
/* counter */
//opens countlog.txt to read the number of hits
$datei = fopen("library/countlog.txt","r");
$count = fgets($datei,1000);
fclose($datei);
$count=$count + 1 ;
// opens countlog.txt to change new hit number
$datei = fopen("library/countlog.txt","w");
fwrite($datei, $count);
fclose($datei);
?>
<?php
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="library/assets/ico/favicon.ico">
<title>3COMPARE</title>
<!-- Bootstrap core CSS -->
<link href="library/css/bootstrap.css" rel="stylesheet" type="text/css">
<!-- Custom styles for this template -->
<link href="library/css/custom.css" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<!-- Custom styles for this template Icones, não mexer! CSS externo -->
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy this line! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Fixed navbar -->
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"><img src="library/images/3compare_logo.jpg" width="233" height="65"></a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Featured Deal</a></li>
<li class="disabled"><a href="#about">Shopping Deal</a></li>
<li class="disabled"><a href="#contact">All Deals</a></li>
<li class="disabled"><a href="#contact">Education Deal</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="selectmodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header orange-bg">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Choose a site to book the deal</h4>
</div>
<div class="modal-body lightgrey-bg">
<!-- ITEM MENU Choose Site -->
<div class="row bbottom marginbottom">
<div class="col-md-6 col-xs-6">
<div class="col-md-4 col-xs-12">
<img src="library/images/hdc_logo.jpg" width="70">
</div>
<div class="col-md-8 col-xs-12">
<a href="http://www.hdc.co.uk/cryo-lipolysis.htm">hdc.co.uk</a><br>
<span class="redtext">Pay at Clinic</span>
</div>
</div>
<div class="col-md-6 col-xs-6">
<div class="col-md-4 col-xs-6">
<h6>One Area</h6>
</div>
<div class="col-md-4 col-xs-6 alinharr">
<h4>£85</h4>
</div>
<div class="col-md-4 col-xs-12">
<h3 class="semmargem widgettitleb"><a class="btn btn-block btn-warning areatwohide btn-shadow" data-toggle="modal" data-target="#myModal" role="button" onClick="document.contact.optionsAreas1.checked=true,document.getElementById('hideOneArea').style.display='block';document.getElementById('hideTwoAreas').style.display='none'"><strong>Go</strong> <i class="fa fa-caret-right fa-lg"></i></a>
</h3>
</div>
</div>
</div>
<!-- ITEM MENU Choose Site -->
<div class="row bbottom marginbottom">
<div class="col-md-6 col-xs-6">
<div class="col-md-4 col-xs-12">
<img src="library/images/hdc_logo.jpg" width="70">
</div>
<div class="col-md-8 col-xs-12">
<a href="http://www.hdc.co.uk/cryo-lipolysis.htm">hdc.co.uk</a><br>
<span class="redtext">Pay at Clinic</span>
</div>
</div>
<div class="col-md-6 col-xs-6">
<div class="col-md-4 col-xs-6">
<h6>Two Areas</h6>
</div>
<div class="col-md-4 col-xs-6 alinharr">
<h4>£165</h4>
</div>
<div class="col-md-4 col-xs-12">
<h3 class="semmargem widgettitleb"><a class="btn btn-block btn-warning areaonehide btn-shadow" data-toggle="modal" data-target="#myModal" role="button" onClick="document.contact.optionsAreas2.checked=true;document.getElementById('hideOneArea').style.display='none';document.getElementById('hideTwoAreas').style.display='block'"><strong>Go</strong> <i class="fa fa-caret-right fa-lg"></i></a>
</h3>
</div>
</div>
</div>
<!-- ITEM MENU Choose Site -->
<div class="row bbottom marginbottom">
<div class="col-md-6 col-xs-6">
<div class="col-md-4 col-xs-12">
<img src="library/images/ls_logo.jpg" width="70">
</div>
<div class="col-md-8 col-xs-12">
<a href="https://www.livingsocial.com/gb/cities/506-north-london/deals/1123987-cryolipolysis-body-contouring-treatment">livingsocial.com</a>
</div>
</div>
<div class="col-md-6 col-xs-6">
<div class="col-md-4 col-xs-6">
<h6>One Area</h6>
</div>
<div class="col-md-4 col-xs-6 alinharr">
<h4>£99</h4>
</div>
<div class="col-md-4 col-xs-12">
<h3 class="semmargem widgettitleb"><a class="btn btn-block btn-warning btn-shadow" href="https://www.livingsocial.com/gb/cities/506-north-london/deals/1123987-cryolipolysis-body-contouring-treatment" role="button"><strong>Go</strong> <i class="fa fa-caret-right fa-lg"></i></a>
</h3>
</div>
</div>
</div>
<!-- ITEM MENU Choose Site -->
<div class="row bbottom marginbottom vcenter">
<div class="col-md-6 col-xs-6 vcenter">
<div class="col-md-4 col-xs-12">
<img src="library/images/wahanda_logo.jpg" width="70">
</div>
<div class="col-md-8 col-xs-12">
<a href="https://www.wahanda.com/place/residential-beauty-london/#tt=2">wahanda.com</a>
</div>
</div>
<div class="col-md-6 col-xs-6">
<div class="col-md-4 col-xs-6 vcenter">
<h6>One Area</h6>
</div>
<div class="col-md-4 col-xs-6 alinharr">
<h4>£120</h4>
</div>
<div class="col-md-4 col-xs-12">
<h3 class="semmargem widgettitleb"><a class="btn btn-block btn-warning btn-shadow" href="https://www.wahanda.com/place/residential-beauty-london/#tt=2" role="button"><strong>Go</strong> <i class="fa fa-caret-right fa-lg"></i></a>
</h3>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-shadow" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel"><img src="library/images/3compare_logo.jpg" width="233" height="65"></h4>
</div>
<div class="modal-body">
<form class="form-horizontal marginform" role="form" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" name="frm1" id="frm1">
<div class="row">
<div class="col-md-4 white-box wborder-box">
<?php
$onearea .= "Order Details <br/>
<strong>Duration:</strong> 45 mins<br/>
<strong>Employee:</strong> Cristina @ HDC<br/>
<strong>SubTotal:</strong> £85.00<br/>
<strong>Total</strong>: £85.00<br/>
<strong>Valid until</strong>: 2014-07-31<br/>";
$twoareas .= "Order Details <br/>
<strong>Duration:</strong> 45 mins<br/>
<strong>Employee:</strong> Cristina @ HDC<br/>
<strong>SubTotal:</strong> £165.00<br/>
<strong>Total</strong>: £165.00<br/>
<strong>Valid until</strong>: 2014-07-31<br/>";
?>
<h5>Order Details</h5>
<div class="radio-inline areasform">
<label for="optionsAreas1" name="oa1label" class="control-label">One Area</label>
<input type="radio" name="optionsAreas" id="optionsAreas1" value="<?php echo ($onearea); ?>">
</div>
<div class="radio-inline areasform">
<label for="optionsAreas2" class="control-label">Two Areas</label>
<input type="radio" name="optionsAreas" id="optionsAreas2" value="<?php echo $twoareas ?>">
</div>
<p><strong>Cryogenic Lipolysis Therapy</br>45-minute session per week for three months, with 13 sessions in total.</strong></p>
<div id="hideOneArea">
<h5>One Area</h5>
<dl class="dl-horizontal">
<dt><small>Duration</small></dt>
<dd><small>45 mins</small></dd>
<dt><small>Employee</small></dt>
<dd><small>Cristina @ HDC</small></dd>
<dt><small>SUBTOTAL</small></dt>
<dd><small>£85.00</small></dd>
<dt><small>TOTAL</small></dt>
<dd><small>£85.00</small></dd>
</dl>
</div>
<div id="hideTwoAreas">
<h5>Two Areas</h5>
<dl class="dl-horizontal">
<dt><small>Duration</small></dt>
<dd><small>45 mins</small></dd>
<dt><small>Employee</small></dt>
<dd><small>Cristina @ HDC</small></dd>
<dt><small>SUBTOTAL</small></dt>
<dd><small>£165.00</small></dd>
<dt><small>TOTAL</small></dt>
<dd><small>£165.00</small></dd>
</dl>
</div>
<p><strong>Payment method:</strong></p>
<div class="radio">
<label>
<input type="radio" name="optionsRadios" id="optionsRadios1" value="Pay At Clinic" checked>Pay At Clinic
</label>
</div>
<div class="radio">
<input type="radio" name="optionsRadios" id="optionsRadios2" value="Other Way" class="hidden">
</div>
<p><strong>Available until: 2014-07-31</strong></p>
<input name="ref" type="hidden" value="<?php $datei = fopen("library/countlog.txt","r");
$count = fgets($datei,1000);
fclose($datei);echo "3COMPAREWLC".$count."-".date('ymd');?>">
</div>
<div class="col-md-8">
<div class="row">
<div class="col-md-12 white-box wborder-box">
<h5>Your contact details</h5>
<div class="form-group">
<label for="inputEmail3" class="col-sm-4 control-label"><small>Your full name*</small></label>
<div class="col-sm-8">
<input type="text" name="name" class="form-control" id="inputEmail3" placeholder="Full Name" value="" required>
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-4 control-label"><small>Your email address*</small></label>
<div class="col-sm-8">
<input type="email" name="email" class="form-control" id="inputPassword3" placeholder="Email" required>
</div>
</div>
<div class="form-group">
<label for="number" class="col-sm-4 control-label"><small class="redtext">Mobile Number*</small></label>
<div class="col-sm-6">
<input type="tel" name="number" class="form-control" id="number" placeholder="Mobile Number" required>
</div>
</div>
<div class="form-group">
<div class="col-sm-12 col-xs-12 alinharr">
<button type="submit" name="submit" class="btn btn-lg btn-danger btn-shadow" value="Send">
<div class="row">
<div class="col-sm-8 col-xs-8">
<small class="sizebtn">Click Here to</small></br><strong class="sizebtnlg">Complete Your Order</strong>
</div>
<div class="col-sm-4 col-xs-4">
<i class="fa fa-gift fa-lg fa-3x"></i>
</div>
</div>
</button>
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<div class="checkbox">
<label>
<input type="checkbox" name="newsletter" value="Yes" id="newsletter" checked> <small>Keep me in the loop about special offers and the latest community news</small>
</label>
<input type="checkbox" class="hidden" name="newsletter" value="No" id="newsletter1">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-shadow" data-dismiss="modal">Go Back</button>
</div>
</div>
</div>
</div>
<div class="container orange-bg">
<div class="row">
<div class="col-md-3 vcenter">
<h2 class="white-text semmargem">London <i class="fa fa-caret-down fa-lg fa-inverse"></i></h2>
</div>
<div class="col-md-9 alinhar">
<h4 class="white-text"><strong>Compare prices from daily deal sites and save up to 85%</strong></h4>
<ul class="list-inline">
<li class="marginbottom"><img src="library/images/groupon_logo.jpg" width="70"></li>
<li class="marginbottom"><img src="library/images/wowcher_logo.jpg" width="70"></li>
<li class="marginbottom"><img src="library/images/ls_logo.jpg" width="70"></li>
<li class="marginbottom"><img src="library/images/wahanda_logo.jpg" width="70"></li>
<li class="marginbottom"><img src="library/images/mdeals_logo.jpg" width="70"></li>
<li class="marginbottom"><img src="library/images/lmin_logo.jpg" width="70"></li>
<li class="marginbottom"><img src="library/images/alocal_logo.jpg" width="70"></li>
</ul>
</div>
</div>
</div>
<div class="container">
<!-- Área do título do Produto -->
<div class="row">
<div class="col-md-12">
<div class="page-header">
<h3><strong>Cryogenic Lipolysis</strong>: </br><small>One or Two Areas from £85 at Weight Loss Clinic (Up to 91% Off)</small></h3>
</div>
</div>
</div>
<!-- Área de detalhes do Produto e Imagem -->
<div class="row">
<!-- Área de Imagem -->
<div class="col-md-8"><img src="library/images/girlr.jpg" width="100%">
</div>
<!-- Área de detalhes do Produto -->
<div class="col-md-4">
<!-- Área de botão Book Now -->
<div class="row">
<div class="col-md-12">
<h2 class="semmargem widgettitleb"><a class="btn btn-lg btn-block btn-warning btn-shadow" data-toggle="modal" data-target="#selectmodal" role="button"><strong>Book Now</strong> <i class="fa fa-arrow-circle-down fa-lg"></i></a>
</h2>
</div>
</div>
<!-- Área de detalhes do Produto Azul -->
<div class="row">
<div class="col-md-12">
<div class="col-md-12 alinhar blue-box">
<h3 class="widgettitle">Amount: £85.00</h3>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-5 alinhar blue-box">
<h4 class="widgettitle">Discount</br>85%</h4>
</div>
<div class="col-md-7 alinhar blue-box">
<h4>You save</br> £600.00</h4>
</div>
</div>
</div>
<!-- Área de detalhes do Produto Verde -->
<div class="row">
<div class="col-md-12">
<div class="col-md-12 alinhar green-box">
<h3 class="widgettitle">Limited Availability</h3>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-12 alinhar green-box">
<h3 class="widgettitle"><?php
/* counter */
//opens countlog.txt to read the number of hits
$datei = fopen("library/countlog.txt","r");
$count = fgets($datei,1000);
fclose($datei);
echo "$count";
?> Bought</h3>
<h5><i class="fa fa-check-square-o fa-lg"></i> Deal is on!</h5>
</div>
</div>
</div>
<!-- Área Rede Social -->
<div class="row">
<div class="col-md-12">
<div class="col-md-12">
<p class="ajustarmargim"><h5>Recommend this deal</h5>
<ul class="list-inline">
<li>
<i class="fa fa-facebook"></i> <a href="http://www.facebook.com/sharer.php?u=http://mobi.3compare.com" target="_blank">Facebook</a>
</li>
<li>
<i class="fa fa-twitter"></i> <a href="http://twitter.com/share?url=http://mobi.3compare.com&text=Book at 3Compare" target="_blank">Twitter</a>
</li>
<li>
<i class="fa fa-envelope"></i> <a href="mailto:?Subject=Book at 3Compare&Body=I%20saw%20this%20and%20thought%20of%20you!%20 http://mobi.3compare.com">E-mail</a>
</li>
</ul>
</p>
</div>
</div>
</div>
</div>
</div>
<!-- Área de informação do Produto -->
<div class="row margintop">
<!-- Área de informação do Produto TEXTO -->
<div class="col-md-8 white-box">
<h4>What is cryogenic lipolysis?</h4>
<p>The treatment uses low temperatures to help contour bodies in conjunction with a healthy lifestyle. A therapist works a high-tech probe over the selected area, applying vacuum suction which creates a warm and then a cold sensation as the treatment takes effect.</p>
<h4>What happens in the session?</h4>
<p>First clients will meet with a practitioner for a private one-to-one consultation, designed to establish suitability for the treatment, and allowing guests to choose the area they'd like to treat. After they've selected either one or two body areas the treatment will begin, lasting up to one hour for one area, and up to two hours for two areas.</p>
<h4>Which areas can be treated?</h4>
<p>The session can target various body parts, such as the lower or upper stomach, outer, inner, or backs of thighs, the upper arms, and flanks (or 'love handles'). Male clients can also choose to use the treatment on the chest area.</p>
<h4>What is the salon like?</h4>
<p>The salon team aim to keep clients comfortable, supporting them during the treatments and afterwards. Inside Fit4less gym, the clinic itself is just a few minutes' walk from Tower Gateway DLR station and Tower Hill underground.</p>
</div>
<!-- Área de informação da Empresa -->
<div class="col-md-4 green-box">
<div class="col-md-12 paddingtop">
<small>Hair Design Clinic HDC</small></br>
<a href="http://www.hdc.co.uk/cryo-lipolysis.htm">Company website</a>
<hr>
<h4 class="widgettitle">Watch Video</h4>
<div class="video-container">
<iframe width="560" height="315" src="//www.youtube.com/embed/NCf9JXW8Gxw" frameborder="0" allowfullscreen></iframe>
</div>
<hr>
<div class="crop">
<img src="library/images/google-maps.jpg" width="100%">
</div>
</div>
<div class="col-md-12">
<div class="panel-body">
<i class="fa fa-map-marker"></i> address
<address>
7 Queens Parade<br>
Hendon<br>
London<br>
NW43AP
</address>
</div>
</div>
</div>
</div>
</div>
</div>
</div> <!-- /container -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="library/js/bootstrap.min.js"></script>
<script src="library/js/modernizr.js"></script>
</body>
</html>
I put the entire code, because this code used to work, and now it sends email, creates pdf attachment, but doenst get the values, like the name, email, phone number, etc.
- form process, with check empty values.
- create html email to be sent, ( it creates, but doesnt send the values from the form)
- create pdf with html2pdf ( it works but doesnt send the values from the form)
So i put here only the form, because i think the problem or its in the form itself or in the processing.
<form class="form-horizontal marginform" role="form" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" name="frm1" id="frm1">
<div class="row">
<div class="col-md-4 white-box wborder-box">
<?php
$onearea .= "Order Details <br/>
<strong>Duration:</strong> 45 mins<br/>
<strong>Employee:</strong> Cristina @ HDC<br/>
<strong>SubTotal:</strong> £85.00<br/>
<strong>Total</strong>: £85.00<br/>
<strong>Valid until</strong>: 2014-07-31<br/>";
$twoareas .= "Order Details <br/>
<strong>Duration:</strong> 45 mins<br/>
<strong>Employee:</strong> Cristina @ HDC<br/>
<strong>SubTotal:</strong> £165.00<br/>
<strong>Total</strong>: £165.00<br/>
<strong>Valid until</strong>: 2014-07-31<br/>";
?>
<h5>Order Details</h5>
<div class="radio-inline areasform">
<label for="optionsAreas1" name="oa1label" class="control-label">One Area</label>
<input type="radio" name="optionsAreas" id="optionsAreas1" value="<?php echo ($onearea); ?>">
</div>
<div class="radio-inline areasform">
<label for="optionsAreas2" class="control-label">Two Areas</label>
<input type="radio" name="optionsAreas" id="optionsAreas2" value="<?php echo $twoareas ?>">
</div>
<p><strong>Cryogenic Lipolysis Therapy</br>45-minute session per week for three months, with 13 sessions in total.</strong></p>
<div id="hideOneArea">
<h5>One Area</h5>
<dl class="dl-horizontal">
<dt><small>Duration</small></dt>
<dd><small>45 mins</small></dd>
<dt><small>Employee</small></dt>
<dd><small>Cristina @ HDC</small></dd>
<dt><small>SUBTOTAL</small></dt>
<dd><small>£85.00</small></dd>
<dt><small>TOTAL</small></dt>
<dd><small>£85.00</small></dd>
</dl>
</div>
<div id="hideTwoAreas">
<h5>Two Areas</h5>
<dl class="dl-horizontal">
<dt><small>Duration</small></dt>
<dd><small>45 mins</small></dd>
<dt><small>Employee</small></dt>
<dd><small>Cristina @ HDC</small></dd>
<dt><small>SUBTOTAL</small></dt>
<dd><small>£165.00</small></dd>
<dt><small>TOTAL</small></dt>
<dd><small>£165.00</small></dd>
</dl>
</div>
<p><strong>Payment method:</strong></p>
<div class="radio">
<label>
<input type="radio" name="optionsRadios" id="optionsRadios1" value="Pay At Clinic" checked>Pay At Clinic
</label>
</div>
<div class="radio">
<input type="radio" name="optionsRadios" id="optionsRadios2" value="Other Way" class="hidden">
</div>
<p><strong>Available until: 2014-07-31</strong></p>
<input name="ref" type="hidden" value="<?php $datei = fopen("library/countlog.txt","r");
$count = fgets($datei,1000);
fclose($datei);echo "3COMPAREWLC".$count."-".date('ymd');?>">
</div>
<div class="col-md-8">
<div class="row">
<div class="col-md-12 white-box wborder-box">
<h5>Your contact details</h5>
<div class="form-group">
<label for="inputEmail3" class="col-sm-4 control-label"><small>Your full name*</small></label>
<div class="col-sm-8">
<input type="text" name="name" class="form-control" id="inputEmail3" placeholder="Full Name" value="" required>
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-4 control-label"><small>Your email address*</small></label>
<div class="col-sm-8">
<input type="email" name="email" class="form-control" id="inputPassword3" placeholder="Email" required>
</div>
</div>
<div class="form-group">
<label for="number" class="col-sm-4 control-label"><small class="redtext">Mobile Number*</small></label>
<div class="col-sm-6">
<input type="tel" name="number" class="form-control" id="number" placeholder="Mobile Number" required>
</div>
</div>
<div class="form-group">
<div class="col-sm-12 col-xs-12 alinharr">
<button type="submit" name="submit" class="btn btn-lg btn-danger btn-shadow" value="Send">
<div class="row">
<div class="col-sm-8 col-xs-8">
<small class="sizebtn">Click Here to</small></br><strong class="sizebtnlg">Complete Your Order</strong>
</div>
<div class="col-sm-4 col-xs-4">
<i class="fa fa-gift fa-lg fa-3x"></i>
</div>
</div>
</button>
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<div class="checkbox">
<label>
<input type="checkbox" name="newsletter" value="Yes" id="newsletter" checked> <small>Keep me in the loop about special offers and the latest community news</small>
</label>
<input type="checkbox" class="hidden" name="newsletter" value="No" id="newsletter1">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
The page is here
www.super8.pt/3compare/
Can someone please help me with this one??
Thanks