I have a script that supposed to display the barcode for each item in the selection (66 rows in this case). However, it displays the barcode from the last item 66 times.
How do I display each item selected? I know all the result of the mysql selection is complete.
Here's the script (postnet.php
<?php
require('class/BCGFont.php');
require('class/BCGColor.php');
require('class/BCGDrawing.php');
require('class/BCGpostnet.barcode.php');
require_once "connect_to_mysql.php";
$result = mysql_query("SELECT * FROM maillist WHERE LEFT(zip,5) = '68502'") or die(mysql_error());
while ($row = mysql_fetch_array($result)) {
$zip11 = $row['postnet ip'];
include "postnet2.php";
echo '<img src="postnet.png" alt="some_text" > <br/>';
}
?>
This script produces the same problem except it displays the fourth item selected four times:
<?php
require('class/BCGFont.php');
require('class/BCGColor.php');
require('class/BCGDrawing.php');
require('class/BCGpostnet.barcode.php');
require_once "connect_to_mysql.php";
$result = mysql_query("SELECT * FROM maillist WHERE LEFT(zip,5) = '68502'") or die(mysql_error());
$row = mysql_fetch_array($result);
$zip11 = $row['postnet ip'];
include "postnet2.php";
echo '<img src="postnet.png" alt="some_text" > <br/>';
$row = mysql_fetch_array($result);
$zip11 = $row['postnet ip'];
include "postnet2.php";
echo '<img src="postnet.png" alt="some_text" > <br/>';
$row = mysql_fetch_array($result);
$zip11 = $row['postnet ip'];
include "postnet2.php";
echo '<img src="postnet.png" alt="some_text" > <br/>';
$row = mysql_fetch_array($result);
$zip11 = $row['postnet ip'];
include "postnet2.php";
echo '<img src="postnet.png" alt="some_text" > <br/>';
?>