bradhiggins
Technical User
- Sep 24, 2003
- 43
Hey all,
I have an ordering system I have designed using PHP, where people can enter in each line item + a description they would like, then click a generate purchase order button.
Currently the next page creates the Purchase order page and displays it back to the client with a Header, Logo etc, the items selected, then a footer with total price, reminder message etc.
This page the client can then print off and keep as their copy, unfortunately if they have large descriptions or lots of items, when it spawns multiple pages it just overlaps keeping the header at top of the first page, and footer at bottom of the last page.
Is there a way that I can have a templated page that has a HEader then footer and just the content changes, and if it is bigger then 1 page, create another header, footer and put the rest of the data in the center.
All I have at the moment is I count the number of items selected, then take it away from my ideal number rows, then pad with blanks (<Br> ) till I display the footer. The problem with this is that if the description line wrapped or had newlines within it would create additional lines I hadn't calculated.
eg
PHP:--------------------------------------------------------------------------------
//display header
PO_Header($dbh, $PO_Nbr, $PO_Details['Date']);
//display items that client selected
Display_Selected_PO_Items($dbh, $PO_Nbr, $PO_Details['Supplier_ID'], $PO_Details['Ship_To']);
//calculate then pad page till footer
$PO_Item_Count = Get_PO_Item_Nbrs($dbh, $PO_Nbr);
if ($PO_Item_Count < 28)
{
$Blank_Rows = 28 - $PO_Item_Count;
for ($i=0; $i<$Blank_Rows; $i++)
{
print "<br>";
}
}
//display footer
PO_footer($dbh, $PO_Nbr);
--------------------------------------------------------------------------------
What I'm trying to get to look like is when you get an invoice from a shop you have a header footer then your purchase/order detaisl in the middle, if larger then one page then the second page has the header and footer and remaining items.
Any help would be greatfully appreciated
Cheers
Brad
I have an ordering system I have designed using PHP, where people can enter in each line item + a description they would like, then click a generate purchase order button.
Currently the next page creates the Purchase order page and displays it back to the client with a Header, Logo etc, the items selected, then a footer with total price, reminder message etc.
This page the client can then print off and keep as their copy, unfortunately if they have large descriptions or lots of items, when it spawns multiple pages it just overlaps keeping the header at top of the first page, and footer at bottom of the last page.
Is there a way that I can have a templated page that has a HEader then footer and just the content changes, and if it is bigger then 1 page, create another header, footer and put the rest of the data in the center.
All I have at the moment is I count the number of items selected, then take it away from my ideal number rows, then pad with blanks (<Br> ) till I display the footer. The problem with this is that if the description line wrapped or had newlines within it would create additional lines I hadn't calculated.
eg
PHP:--------------------------------------------------------------------------------
//display header
PO_Header($dbh, $PO_Nbr, $PO_Details['Date']);
//display items that client selected
Display_Selected_PO_Items($dbh, $PO_Nbr, $PO_Details['Supplier_ID'], $PO_Details['Ship_To']);
//calculate then pad page till footer
$PO_Item_Count = Get_PO_Item_Nbrs($dbh, $PO_Nbr);
if ($PO_Item_Count < 28)
{
$Blank_Rows = 28 - $PO_Item_Count;
for ($i=0; $i<$Blank_Rows; $i++)
{
print "<br>";
}
}
//display footer
PO_footer($dbh, $PO_Nbr);
--------------------------------------------------------------------------------
What I'm trying to get to look like is when you get an invoice from a shop you have a header footer then your purchase/order detaisl in the middle, if larger then one page then the second page has the header and footer and remaining items.
Any help would be greatfully appreciated
Cheers
Brad