Using fpdf I am trying to create an invoice to send to clients. The products are sold in pricing tiers.
I've got it working so it only displays a tier if the quantity is greater than 0 but I end up with a bunch of empty rows in between.
Instead of for example:
1 $20
2 $30
3 $40
I am getting
1 $20
2 $30
3 $40
How can I get it so the row is advanced only if something is output?
Code: for ($j=0; $j<12; $j++)
{
$data = Array();
if($pricearray[$j] > 0){
$data[0]['TEXT'] = $pricearray[$j];
$data[1]['TEXT'] = $_POST['select'];
$data[1]['TEXT'] .= " " . $pricedescriptionarray[$j];
$data[2]['TEXT'] = "Description";
$data[3]['TEXT'] = "20";
$data[4]['TEXT'] = "100";
}
$fsize += 0.5;
if ($fsize > 10) $fsize = 5;
$rgb_b -= 10;
$rgb_g -= 5;
$rgb_b -= 20;
if ($rgb_b < 150) $rgb_b = 255;
if ($rgb_g < 150) $rgb_g = 255;
if ($rgb_b < 150) $rgb_b = 255;
$pdf->tbDrawData($data);
}
same querie, or a new one??
Hi guys,I'm still working on this drop down list. I've got the actual drop down list to work (call all the "pname"s from the table, and I've even found how to print the result once you
using file_get_contents??
okay how would i create a script using file_get_contents() in php have it grab search pages 1-20 and return the results based on whatever username was typed into the form.liek for example i would type
Extract specific information from a PHP Multidimensional Array
Howdy! I've racked my brain over this for 24 hours now. I think it's time I asked for help. I'm learning PHP and believe my I've manipulated many code blocks trying to get this to work with for and
Login Script Issues
I am using a script I got from http://phpsense.com/php/php-login-script.html in order to allow people to login but prevent multiple logins with the same username. Everything appears to work fine
help, header() is not working!
Hello, I have this code:<?php/** * @author samoi * @copyright 2009 */error_reporting(E_ALL & E_NOTICE);include ('func.php'); // this has the session_start() func!if
post to self
Trying to get my form to submit to itself. However I am also trying to use an image for my submit button, when I set the type='image' it will not submit to itself. Can someone help me figure out
Baffled by Undefined Index in Simple Array: Please Help!
Hello. I have a form which posts an array to this script. However, I can't seem to access the values in the array; I keep getting an undefined index. Something is not right, but the code is so simple!
How to validate from 2 possible answers
Hi I hope somebody can help me with what will probably be really simple, I'm pulling my hair trying to get my head round it.I've got a contact form and I would like to add to it a couple of simple
Help with looping
I have a comma separated list of colors taken from a database ($ICo) and a directory of images named "color". The images are named the "color.jpg"I am attempting to loop through
parsing error
can anyone explain this syntax error:Parse error: syntax error, unexpected T_IFThe error is occuring at the blank field check ie: if (!$_POST['username]...etc etc//check if form has been submittedif