QR CODE not printing - php

I generating a QR CODE with url as data content, but when i try to print a page where the qr is generated, the qr does not seem to appear yet other content displays. Here is my snippet
<?php
require_once("qrcode.php");
//---------------------------------------------------------
$qr = new QRCode();
// ƒGƒ‰[’ù³ƒŒƒxƒ‹‚ðÝ’è
// QR_ERROR_CORRECT_LEVEL_L : 7%
// QR_ERROR_CORRECT_LEVEL_M : 15%
// QR_ERROR_CORRECT_LEVEL_Q : 25%
// QR_ERROR_CORRECT_LEVEL_H : 30%
$qr->setErrorCorrectLevel(QR_ERROR_CORRECT_LEVEL_L);
$qr->setTypeNumber(4);
$qr->addData("http:/".$_SERVER['REQUEST_URI']."");
$qr->make();
//---------------------------------------------------------
?>
and below is the other content on the page
<div class="invoice-box" id="invoice-box">
<table cellpadding="0" cellspacing="0">
<tr class="top">
<td colspan="2">
<table>
<tr>
<td class="title">
<img src="images/logo.png" style="width:100%; max-width:200px; height:95px;">
</td>
<td>
Invoice #: <?php print $invoice_details->sub_code ?><br>
Created: <?php print date('Y/M/d', strtotime($invoice_details->paid_date)) ?><br>
Due: February 1, 2015
</td>
</tr>
</table>
</td>
</tr>
<tr class="information">
<td colspan="2">
<table>
<tr>
<td>
<br>
<br>
</td>
<td>
<?php print $invoice_details->org ?><br>
<?php print $invoice_details->lname ?> <?php print $invoice_details->fname ?><br>
<?php print $invoice_details->email ?>
</td>
<td>
<?php $qr->printHTML(); ?>
</td>
</tr>
</table>
</td>
</tr>
<tr class="heading">
<td>
Payment Method
</td>
<td>
</td>
</tr>
<tr class="details">
<td>
<?php print $invoice_details->method ?>
</td>
<td>
</td>
</tr>
<tr class="heading">
<td>
Item
</td>
<td>
Price(UGX)
</td>
</tr>
<tr class="item">
<td>
<?php print ucfirst($invoice_details->event) ?> - Summit
</td>
<td>
<?php print number_format($invoice_details->amount) ?>
</td>
</tr>
<tr class="total">
<td></td>
<td>
Total: UGX <?php print number_format($invoice_details->amount) ?>
</td>
</tr>
</table>
</div>
<input type="button" value="Print Div" onclick="PrintElem('#invoice-box')" />
and my printing script
<script type="text/javascript">
function PrintElem(elem)
{
Popup($(elem).html());
}
function Popup(data)
{
var mywindow = window.open('', 'invoice-box', 'height=400,width=600');
mywindow.document.write('<html><head><title>my div</title>');
/*optional stylesheet*/ //mywindow.document.write('<link rel="stylesheet" href="main.css" type="text/css" />');
mywindow.document.write('</head><body >');
mywindow.document.write(data);
mywindow.document.write('</body></html>');
mywindow.document.close(); // necessary for IE >= 10
mywindow.focus(); // necessary for IE >= 10
mywindow.print();
mywindow.close();
return true;
}
</script>

Assuming I found the correct library, it has an image creator. What you need to do is use an output buffer around the imagegif (or imagepng) call to capture the image's binary data into a string, then base64 encode the string, and echo that as part of a data URI directly in the src attribute of an img tag.
$img = $qr->createImage(4, 2);
ob_start();
imagegif($img);
imagedestroy($img);
$img = ob_get_clean();
In your HTML
<img src="data:image/gif;base64,<?php echo base64_encode($img);?>">
If you're concerned about support for data URLs, leave out the output buffering, add a unique, random filename as the second parameter to the imagegif call to save it, then echo that filename in the src.

It seems that you're trying to print a black background color which is removed by default from printing. Unfortunately there's no way to force it back programatically in browsers other than Safari and Chrome.
You can force this back for Safari and Chrome by doing:
<div class="invoice-box" id="invoice-box">
<style>
.invoice-box table td: {
-webkit-print-color-adjust: exact !important;
}
</style>
<table cellpadding="0" cellspacing="0">
<tr class="top">
<td colspan="2">
<table>
<tr>
<td class="title">
<img src="images/logo.png" style="width:100%; max-width:200px; height:95px;">
</td>
<td>
Invoice #: <?php print $invoice_details->sub_code ?><br>
Created: <?php print date('Y/M/d', strtotime($invoice_details->paid_date)) ?><br>
Due: February 1, 2015
</td>
</tr>
</table>
</td>
</tr>
<tr class="information">
<td colspan="2">
<table>
<tr>
<td>
<br>
<br>
</td>
<td>
<?php print $invoice_details->org ?><br>
<?php print $invoice_details->lname ?> <?php print $invoice_details->fname ?><br>
<?php print $invoice_details->email ?>
</td>
<td>
<?php $qr->printHTML(); ?>
</td>
</tr>
</table>
</td>
</tr>
<tr class="heading">
<td>
Payment Method
</td>
<td>
</td>
</tr>
<tr class="details">
<td>
<?php print $invoice_details->method ?>
</td>
<td>
</td>
</tr>
<tr class="heading">
<td>
Item
</td>
<td>
Price(UGX)
</td>
</tr>
<tr class="item">
<td>
<?php print ucfirst($invoice_details->event) ?> - Summit
</td>
<td>
<?php print number_format($invoice_details->amount) ?>
</td>
</tr>
<tr class="total">
<td></td>
<td>
Total: UGX <?php print number_format($invoice_details->amount) ?>
</td>
</tr>
</table>
</div>
<input type="button" value="Print Div" onclick="PrintElem('#invoice-box')" />
For browsers like IE and Firefox unfortunately this requires user interaction. See this question for more answers: Printing background-color in Firefox and IE

Finally, i got a way around this, here is my solution
<?php
require_once("qrcode.php");
$qr = QRCode::getMinimumQRCode("http:/".$_SERVER['REQUEST_URI']."", QR_ERROR_CORRECT_LEVEL_L);
$img = $qr->createImage(4, 2);
ob_start();
imagegif($img);
imagedestroy($img);
$img = ob_get_clean();
?>
Then output the qrcode as image with this;
<img src="data:image/gif;base64,<?php echo base64_encode($img);?>">
Thanks to #walf for his solution somehow, hope it helps someone else.

Related

Get class element

I make Jquery to read data from db and when I click the list it shown roe data on detail box.
But.... problem: I make div where I show content. I load page with Jquery to div.
but when I do this the row click dont work. I can not understan why. It is shild element but id i understan right when I use getElementById it should to take current row, but no.
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<?php include './config/init.php'; ?>
<html>
<head>
<meta charset="UTF-8">
<title>Biisilista</title>
<script src="./js/jquery-3.2.1.js"></script>
<link href="css/basic.css" rel="stylesheet" type="text/css">
</head>
<body>
<h1>KaraokeBiisit </h1>
<div id="edit" style="display:none">
<div>
<form name="formedit" method="post" action="">
<table id="edittable" border="1" cellspacing="2" cellpadding="1">
<tbody>
<tr>
<td>
<label>Nimi:</label>
</td>
<td>
<input id="nimi" name="nimi" placeholder="Kappaleen nimi" type="text">
</td>
<td>
<label>Levy:</label>
</td>
<td>
<input id="levy" name="levy" placeholder="Levyn tunnus" type="text" width="10px">
</td>
</tr>
<tr>
<td>
<label>Artisti:</label>
</td>
<td>
<input id="artisti" name="artisti" placeholder="Kappaleen esittäjä" type="text">
</td>
<td>
<label>Kieli:</label>
</td>
<td>
<input id="kieli" name="kieli" placeholder="Alkuperäiskieli" type="text" width="20">
</td>
</tr>
<tr>
<td>
<label>Numero:</label>
</td>
<td>
<input id="numero" name="numeron" placeholder="Numero" type="text">
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<div id="pageContent">
</div>
<script src="./js/jquery-3.2.1.js"></script>
<script src="./js/script.js"></script>
</body>
</html>
jQuery(document).ready(function ($) {
$("#pageContent").click(function () {
$('tr').removeClass('selected');
$(this).addClass('selected');
var selectedRow;
selectedRow = $(rivi);
var td = $(selectedRow).children('td');
$('#nimi').val(td[0].innerText);
$('#artisti').val(td[1].innerText);
$('#levy').val(td[2].innerText);
$('#kieli').val(td[3].innerText);
$('#numero').val(td[4].innerText);
console.log("test");
});
$(".clickable-row").on('click', () => {
$('#edit').show();
});
$('#pageContent').load('container.php');
// $('#pageContent').load('biisit.php');
});
function showBiisit() {
console.log("Näytetään sisältö");
$('#pageContent').load('container.php');
}
<?php include './config/init.php'; ?>
<?php
//luodaan tietokantaobjekti
$db = new DataBase();
// tehdään kysely
$db->query("SELECT * FROM kappaleet");
//query("SELECT `id`,`nimi`,`artisti`,`levy`,`kieli`,`numero` FROM `kappaleet`;");
//yhdistetään hakutulokseen
$kappaleet = $db->resultset();
?>
<table id="dataTable">
<tr>
<th>Nimi</th>
<th>Artisti</th>
<th width="100" align="left">Levy</th>
<th width="100" align="left">Kieli</th>
<th width="100" align="left">Numero</th>
</tr>
<?php foreach ($kappaleet as $biisi): ?>
<tr class='clickable-row' >
<td><?php echo $biisi->nimi ?></td>
<td><?php echo $biisi->artisti ?></td>
<td><?php echo $biisi->levy ?></td>
<td><?php echo $biisi->kieli ?></td>
<td><?php echo $biisi->numero ?></td>
</tr>
<?php endforeach; ?>
</table>
try this
...
$("body").on('click', '.clickable-row', function () { //i change this line
$('tr').removeClass('selected');
$(this).addClass('selected');
var selectedRow = $(this);
//selectedRow = $(rivi); idk what is this
var td = selectedRow.children('td');
$('#nimi').val(td[0].innerText);
$('#artisti').val(td[1].innerText);
$('#levy').val(td[2].innerText);
$('#kieli').val(td[3].innerText);
$('#numero').val(td[4].innerText);
console.log("test");
});
...

How to automatically generate rowspan using php

In this code everything is perfect except that I could not generate rowspan in the Internal Grade cell. this line <td rowspan="<?php echo $cols;?>"> hides the bottom border while I expect to span the rows every time the code generates rows. Thanks for your input and sorry for using mysql() function. I am newbie.
<?php $cols=mysql_num_rows($grds); ?>
<table>
<?php do{ ?>
<tr>
<td> </td>
//This hide the bottom border
<td rowspan="<?php echo $cols;?>">Internal<br />Grades</td>
<td colspan="2"> <?php echo strtoupper($row_grds['grade_name']); ?></td>
<td><?php echo strtoupper($row_grds['igrade']); ?></td>
<?php } while ($row_grds=mysql_fetch_assoc($grds)); ?>
</tr>
</table>
The output is like below:
output is here
The code generated by php is:
<table>
<tr>
<td> </td>
<td rowspan="1"> </td>// A
<td colspan="2"> RHYMES</td>
<td align="center">B</td>
</tr>
<tr>
<td> </td>
<td rowspan="2"> </td>//B
<td colspan="2"> CONVERSATION</td>
<td align="center">A</td>
</tr>
</table>
I want to merge A and B
Expected output is:
<table>
<tr>
<td> </td>
<td rowspan="2"> Internal<br /> Grade</td>
<td colspan="2"> RHYMES</td>
<td align="center">B</td>
</tr>
<tr>
<td> </td>
<td colspan="2"> CONVERSATION</td>
<td align="center">A</td>
</tr>
</table>
You can do something similar to this:
<table>
<?php $row_grds = mysql_fetch_assoc($grds); ?>
<tr>
<td> </td>
<td rowspan="<?=$cols;?>">Internal<br />Grades</td>
<td colspan="2"> <?=strtoupper($row_grds['grade_name']);?></td>
<td><?=strtoupper($row_grds['igrade']);?></td>
</tr>
<?php while ($row_grds=mysql_fetch_assoc($grds)): ?>
<tr>
<td> </td>
<td colspan="2"> <?=strtoupper($row_grds['grade_name']);?></td>
<td><?=strtoupper($row_grds['igrade']);?></td>
</tr>
<?php endwhile; ?>
Its not perfect but you are using mysql_fetch_assoc, which on its own is not perfect either :D

Fwrite not writing inside of if statement

I have a fwrite writing each business' page but i want it so that it only shows the html of the page when you go to the url with a valid session so i wrote
fwrite($fp,"
However when it writes the page it writes this . The isset statement is gone from the if statement.
<?php
$recid = $_POST['recid'];
$username = $_POST['name'];
$email = $_POST['email'];
$ownername = $_POST['ownername'];
include ("connection.php");
$result = $db->query("UPDATE users SET verified='y' WHERE recid='$recid'");
$doctype = "<!DOCTYPE html>";
$htmlOpen = "<html>";
$head = "<head> <meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'>
<script src='http://code.jquery.com/jquery-1.9.1.min.js'> </script>
<script src='http://code.jquery.com/ui/1.10.2/jquery-ui.js'> </script>
<script src='Scripts/dropdown.js'> </script>
<link rel='stylesheet' href='CSS/businesspages.css'>
<link rel='stylesheet' href='http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css'>
<script src='Scripts/postdata.js'> </script>
</head>";
$bodyOpen = "<body>";
$header = "<div id='header'> </div>";
$wcImage = "<img src='wc.png' id='wc'>";
$accountTable = "<table id='accountinfo'>
<tr> <td id='accountinfotd1'> </td> </tr>
<tr> <td id='accountinfotd2'>{$username}</td> </tr>
<tr> <td id='accountinfotd3'>{$ownername}</td> </tr>
</table>";
$linksTable = "<table id='links'>
<tr> <td> <input type='text' id='post' placeholder='Post' name='post'> </td> </tr>
<tr> <td> <img src='images/profile.jpg' id='profile'> </td> </tr>
<tr> <td> <div id='profileDiv'>
<table>
<tr>
<td> <input type='password' id='changePSW' name='changePSW' placeholder='Change Password' tabindex=2> </td>
<td> <input type='password' id='verifyPSW' name='verifyPSW' placeholder='Verify Password' tabindex=3> </td>
<td> <input type='image' id='changePSWBtn' src='images/changeBtn.jpg' name='changePSWBtn'> </td>
</tr>
<tr>
<td> <input type='text' id='changeLA' name='changeLA' placeholder='Latitude' tabindex=6> </td>
<td> <input type='text' id='changeLO' name='verifyPSW' placeholder='Longatude' tabindex=7> </td>
<td> <input type='image' id='changeLLBtn' src='images/changeBtn.jpg' name='changeLLBtn'> </td>
</tr>
</table>
</div> </td> </tr>
<tr> <td> <img src='images/legal.jpg' id='legal'> </td> </tr>
<tr> <td> <div id='legalDiv'>
<a href='Legal_Documents/termsofuseweb.pdf' target='_blank'> Web Terms Of Use </a> </br>
<a href='Legal_Documents/termsofuseios.pdf' target='_blank'> iOS Terms Of Use </a> </br>
<a href='Legal_Documents/enduserlisenceagreement.pdf' target='_blank'> End Of User Licensee </a>
</div> </td> </tr>
<tr> <td> <img src='images/help.jpg' id='help'> </td> </tr>
<tr> <td> <div id='helpDiv'>
<p> If you need help you can contact Phil Pilon or Matt Muehlemann info#wolfeboroconnection.com </p>
</div> </td> </tr>
</table>";
$bodyClose = "</body>";
$htmlClose = "</html>";
$isset = "{$_SESSION['id']}";
$filename = str_replace(" ","_", trim($username) );
mkdir("Business_Pages/" . $filename."/");
if( $fp = fopen("Business_Pages/" . $filename . "/" . $filename . ".php", "w") )
{
fwrite($fp,"<?php session_start();");
fwrite($fp, "if(isset({$_SESSION['id']})) { ?");
fwrite($fp, $doctype.$htmlOpen.$head.$bodyOpen.$header.$wcImage.$accountTable.$linksTable.$bodyClose.$htmlClose);
fwrite($fp,"<?php } else { echo \"User not logged in\";} ?>");
fclose($fp);
}
This is the page it fwrites
<?php session_start();if() { ?><!DOCTYPE html>
<html><head> <meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'>
<script src='http://code.jquery.com/jquery-1.9.1.min.js'> </script>
<script src='http://code.jquery.com/ui/1.10.2/jquery-ui.js'> </script>
<script src='Scripts/dropdown.js'> </script>
<link rel='stylesheet' href='CSS/businesspages.css'>
<link rel='stylesheet' href='http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css'>
<script src='Scripts/postdata.js'> </script>
</head>
<body>
<div id='header'> </div><img src='wc.png' id='wc'><table id='accountinfo'>
<tr> <td id='accountinfotd1'> </td> </tr>
<tr> <td id='accountinfotd2'>test </td> </tr>
<tr> <td id='accountinfotd3'></td> </tr>
</table><table id='links'>
<tr> <td> <input type='text' id='post' placeholder='Post' name='post'> </td> </tr>
<tr> <td> <img src='images/profile.jpg' id='profile'> </td> </tr>
<tr> <td> <div id='profileDiv'>
<table>
<tr>
<td> <input type='password' id='changePSW' name='changePSW' placeholder='Change Password' tabindex=2> </td>
<td> <input type='password' id='verifyPSW' name='verifyPSW' placeholder='Verify Password' tabindex=3> </td>
<td> <input type='image' id='changePSWBtn' src='images/changeBtn.jpg' name='changePSWBtn'> </td>
</tr>
<tr>
<td> <input type='text' id='changeLA' name='changeLA' placeholder='Latitude' tabindex=6> </td>
<td> <input type='text' id='changeLO' name='verifyPSW' placeholder='Longatude' tabindex=7> </td>
<td> <input type='image' id='changeLLBtn' src='images/changeBtn.jpg' name='changeLLBtn'> </td>
</tr>
</table>
</div> </td> </tr>
<tr> <td> <img src='images/legal.jpg' id='legal'> </td> </tr>
<tr> <td> <div id='legalDiv'>
<a href='Legal_Documents/termsofuseweb.pdf' target='_blank'> Web Terms Of Use </a> </br>
<a href='Legal_Documents/termsofuseios.pdf' target='_blank'> iOS Terms Of Use </a> </br>
<a href='Legal_Documents/enduserlisenceagreement.pdf' target='_blank'> End Of User Licensee </a>
</div> </td> </tr>
<tr> <td> <img src='images/help.jpg' id='help'> </td> </tr>
<tr> <td> <div id='helpDiv'>
<p> If you need help you can contact Phil Pilon or Matt Muehlemann info#wolfeboroconnection.com </p>
</div> </td> </tr>
</table></body></html><?php } else { echo "User not logged in";} ?>
The reason is because you are using the following line:
fwrite($fp, "if(isset({$_SESSION['id']})) { ?");
Because you are using double quotes it means that the session value {$_SESSION['id']} will be parsed by PHP, before being written to the file via fwrite. If you change your quotes to single quotes you wont have this problem, as PHP will leave single quoted strings alone — i.e. not parse them for variables:
fwrite($fp, 'if(isset($_SESSION["id"])) { ?');
You should also remove the surrounding curly braces on the session var, unless you want your php to be erroneous when it is reparsed.
This is all assuming that the outcome you want in the file is:
if(isset($_SESSION["id"])) { ?

how to create jquery hover

How do I create a jQuery hover to show a div when the mouse is over like twitter repla retweet and favorite?
Here is my HTML:
<div style="display:none;" id="blab">
<?php echo $blab_id; ?>
</div>
<a href="blab.php?id=<?php echo $blab_id; ?>">
<div class="blab_body" id="hover" value="Hide">
<table>
<tr>
<td valign="top">
<img src="<?php echo $profile_pic_info; ?>" class="blab_image" width="50" height="50" />
</td>
<td> </td>
<td>
<table>
<tr>
<td valign="top">
<a href="profile.php?id=$mem_id">
<strong><?php echo $added_fullname; ?></strong>
</a>
<?php echo $added_to_fullname; ?>
</td>
</tr>
<tr>
<td>
<?php echo $blab_body; ?>
</td>
</tr>
<tr>
<td>
<text style="color:gray;">
<?php echo $blab_date; ?>|<?php echo $device; ?>
</text>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div style="background:#000; display:none;" id="id"> </div>
</div>
</a>
<hr />
and here is my JavaScript code:
$('#id').hide();
$('#hover').hover(function () {
var blab_id = $('#blab').text();
$('#id').show();
}, function () {
$('#id').hide();
});
It shows the div for the first one only.
You can only use a certain ID once on the whole page! If you insert more than one copy of this div on the page, your HTML code becomes invalid. That's why jQuery only attaches the event handler to the first element.
The solution is to use class="hover_enabled" instead of id="hover" as it is allowed to add the same class to multiple elements. Here is how you would do it in jQuery:
$('.hover_enabled').hover(function() { ...
The same thing applies to #id.

Printing website correctly

I am trying to make a website that reads from a csv file and render the data on the screen in a printable format (it is for printing tickets). The page creates 2 tickets per row and loops threw until it runs out of data. It all works perfectly and looks just the way i want it but, when i print it the 3rd row down has one of the rows of text move up onto the line above it. My question is how can i make it print the way it is seen on the screen and why would it screw up only the 3rd row when all rows are made with the same code.
Thanks
EDIT:
while (!feof($file_handle)){`
$csvText = fgetcsv($file_handle, 1024);
$username = $csvText[1];
$password = $csvText[2];
$profile = $csvText[3];
$daysValid = $csvText[4];
$expiry = $csvText[5];
if($pos == 0)
{
if($count == 5){
echo "<p><br /></p>";
$count = 0;
}else{
$count++;
}
echo "<div class='itemRow'>";
echo "<div class='left'>";
$pos = 1;
?>
<h4 class="centre">Internet Access Voucher</h4>
<img class="image" src="./icon.jpg" />
<div class="info">
<table>
<tr>
<td>
Username
</td>
</tr>
<tr>
<td>
Password
</td>
</tr>
<tr>
<td>
Profile
</td>
</tr>
<tr>
<td>
Valid for
</td>
</tr>
<tr>
<td>
Expiry date
</td>
</tr>
</table>
</div>
<div class="uniqueInfo">
<table>
<tr>
<td>
<?php echo $username;?>
</td>
</tr>
<tr>
<td>
<?php echo $password;?>
</td>
</tr>
<tr>
<td>
<?php echo $profile;?>
</td>
</tr>
<tr>
<td>
<?php echo $daysValid;?>
</td>
</tr>
<tr>
<td>
<?php echo $expiry;?>
</td>
</tr>
</table>
</div>
<p class="centre"><br />Please remember to disconnect to stop each session.</p>
</div>
<br />
<?php
} else {
?>
<div class="right">
<h4 class="centre">Internet Access Voucher</h4>
<img class="imageRight" src="./icon.jpg" />
<div class="infoRight">
<table>
<tr>
<td>
Username
</td>
</tr>
<tr>
<td>
Password
</td>
</tr>
<tr>
<td>
Profile
</td>
</tr>
<tr>
<td>
Valid for
</td>
</tr>
<tr>
<td>
Expiry date
</td>
</tr>
</table>
</div>
<div class="uniqueInfoRight">
<table>
<tr>
<td>
<?php echo $username;?>
</td>
</tr>
<tr>
<td>
<?php echo $password;?>
</td>
</tr>
<tr>
<td>
<?php echo $profile;?>
</td>
</tr>
<tr>
<td>
<?php echo $daysValid;?>
</td>
</tr>
<tr>
<td>
<?php echo $expiry;?>
</td>
</tr>
</table>
</div>
<p class="centre"><br />Please remember to disconnect to stop each session.</p>
</div>
</div>
<?php
$pos = 0;
}
}
?>
CSS
.centre
{
text-align:center;
}
.itemRow
{
position:relative;
top:0px;
}
.left
{
width:500px;
position:relative;
font-family:Comic Sans, Comic sans MS, cursive;
/*border-style:solid;
border-width:1px;*/
}
.right
{
width:500px;
position:absolute;
left:600px;
top:-20px;
font-family:Comic Sans, Comic sans MS, cursive;
/*(border-style:solid;
border-width:1px;*/
}
.image
{
position:absolute;
top:70px;
}
.info
{
position:relative;
left:63px;
}
.uniqueInfo
{
position:absolute;
left:250px;
top:42px;
}
.infoRight
{
position:relative;
left:63px;
top:0px;
}
.uniqueInfoRight
{
position:absolute;
left:250px;
top:65px;
}
.imageRight
{
position:absolute;
top:90px;
}
I suspect this might be the problem:
if($count == 5){
echo "<p><br /></p>";
You have 2 per row, and increment $count after every ticket. So, $count = 5 would be after the fourth ticket, or when the third row starts. A sample HTML page would give me a better idea of what's going on exactly, but I'd suggest doing something like
<br style="clear: both;" />
between the rows to split them cleanly. So before ticket 3 and 5 ($count = 3 and $count = 5).

Categories