First of all, I’ve been reading the forums for some time and I want to say thanks for the help in advance. It looks like there is a talented group of professionals here.
I know there is another way to do the follow, I’m just not sure how:
[php]@ob_start();
$qstr = ‘’;
$encode = ‘CODE39’;
$bdata = $product->order_product_code;
$height = “20”;
$scale = “2”;
$bgcolor =“FFFFFF”;
$color = “000000”;
$type=“jpg”;
$_POST[‘encode’] = $encode;
$_POST[‘bdata’] = $bdata;
$_POST[‘height’] = $height;
$_POST[‘scale’] = $scale;
$_POST[‘bgcolor’] = $bgcolor;
$_POST[‘color’] = $color;
$_POST[‘type’] = $type;
foreach($_POST as $key=>$value)
$qstr.=$key."=".urlencode($value)."&";
echo "<img src='barcode.php?$qstr'>";
ob_end_flush();[/php]
Some of the code in here may not even be required. I’m very new to PHP still and I’m trying to modify this to dynamically create bar codes for an online ordering system. Originally, user input via a form was used to set the variables but I know what I want the variables to be already. What I don’t know/don’t understand is how to correctly change the foreach to use the variables I have set. The only one that should be changing is the $bdata variable.
Again, thanks in advance!
–Joel