[PHP-DB] Print
Hi, I have a pressing problem with regards to printing. My situation is as follows: 1) I have a form in a table format with the following headers: | No. | Date | Contents | Remarks | 2) the fields under Contents and Remarks are textareas to allow users to type as much as they want. 3) after submitting the form, user will click on a button that will activate window.print() to print the form 4) however, sometimes user types too much and the information spills over to two or more pages. 5) user thus wish to also have the headers of the table repeated on the subsequent pages. So, my problem is, how can I know when the information will be more than a page? is there a way in PHP to calculate the number of lines output and then I can force a page-break? please help me. thank you soo soo much! regards, hwee hwee
RE: [PHP-DB] Print Query
You may be able to view this report in Excel and print it from there. If this is an option, do the following in Excel: 1. Data - Import External Data - New Web Query 2. Enter the URL for your report in the Address field and click Go. It is possible to start at one URL and browse to the report if you need to authenticate. 3. Toggle the yellow arrow boxes to green checkmarks if you want to include that in your spreadsheet. 4. Click Import. You will lose your formatting, but this is an option that doesn't require writing any code. Ryan -Original Message- From: Norma Ramirez - TECNOSOFT [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2003 8:13 AM To: lista php Subject: [PHP-DB] Print Query I´have a complex report from mysql via php whits css, frames etc... Someone know a script to make a printable versión of this? Thank´s Norma Ramirez -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] print table truncated
Hi, I havea question about printing.When the table in HTML page is too big and I print the page,part of the table got truncated.Is there a way to print the web page without truncation? Thanks in advance. Dan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] print table truncated
Dan, It is more of a HTML-related question: Need to change the table width in percentage (%) rather than just numbers. HTH, -rob Dan Liu [EMAIL PROTECTED] 03/31/2003 01:17 PM To: [EMAIL PROTECTED] cc: Subject:[PHP-DB] print table truncated Hi, I havea question about printing.When the table in HTML page is too big and I print the page,part of the table got truncated.Is there a way to print the web page without truncation? Thanks in advance. Dan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] print
It IS following your \n, but HTML doesn't know what a newline is. Do a vbiew source and you'll see that it's got line breaks. You need to use BR or P tags so that *HTML* knows what you want from it. As for property_type, print_r($row) in the while statement to see what's coming out of the db. --- Addison Ellis [EMAIL PROTECTED] wrote: hi, i still am having a problem. can you see what is wrong with what i've got. and... thank you. best regards, addison ellis this is what is printing: 2Bedroom/2Bath great From Campus Available imm 500.00 Contact: 321-1791 it is not printing the property_type and it is not following my \n commands. here's the code: ? // Begin Ad Block $count = 0; $id = 50; $obj = mysql_db_query($dbname,select a.*,s.name as subcategory_name,c.name as category_name from ads a,subcategory s,category c where a.subcategory=s.id and s.category=c.id and a.subcategory=$id and a.que='checked'); if ($obj mysql_num_rows($obj)0) { while($row = mysql_fetch_object($obj)) { $count++; ? ? echo {$row-bedrooms}Bedroom/{$row-baths}Bath{$row-property_type}\n {$row-description}\n {$row-distance} From Campus Available {$row-date_available}\n {$row-price}\n Contact: {$row-contact}; ? /fontfont color=#00 size=2 face=Arial, Helvetica, sans-serifbr / br img src=../images/thin_line.gif width=185 height=1br br ? } } // End Ad Block ? thanks again... -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED] = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. -Stolen from the now-defunct Randy's Random mailing list. *** __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] print
hello, i have a form someone fills out, say with the field # of bedrooms. they submit. data goes into db. how can i get the # of bedrooms to print 4 Bedrooms instead of just 4? thank you, addison -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] print resolved- thank you
hello, i have a form someone fills out, say with the field # of bedrooms. they submit. data goes into db. how can i get the # of bedrooms to print 4 Bedrooms instead of just 4? thank you, addison -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] print
with php: echo $result['field_number_of_bedrooms'] . Bedrooms; wih SQL: SELECT CONCAT(field_number_of_bedrooms, ' Bedrooms') as field_number_of_bedrooms from table; echo $result['field_number_of_bedrooms']; -- Maxim Maletsky [EMAIL PROTECTED] On Sun, 2 Feb 2003 12:46:16 -0600 Addison Ellis [EMAIL PROTECTED] wrote: hello, i have a form someone fills out, say with the field # of bedrooms. they submit. data goes into db. how can i get the # of bedrooms to print 4 Bedrooms instead of just 4? thank you, addison -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] print
hi, i still am having a problem. can you see what is wrong with what i've got. and... thank you. best regards, addison ellis this is what is printing: 2Bedroom/2Bath great From Campus Available imm 500.00 Contact: 321-1791 it is not printing the property_type and it is not following my \n commands. here's the code: ? // Begin Ad Block $count = 0; $id = 50; $obj = mysql_db_query($dbname,select a.*,s.name as subcategory_name,c.name as category_name from ads a,subcategory s,category c where a.subcategory=s.id and s.category=c.id and a.subcategory=$id and a.que='checked'); if ($obj mysql_num_rows($obj)0) { while($row = mysql_fetch_object($obj)) { $count++; ? ? echo {$row-bedrooms}Bedroom/{$row-baths}Bath{$row-property_type}\n {$row-description}\n {$row-distance} From Campus Available {$row-date_available}\n {$row-price}\n Contact: {$row-contact}; ? /fontfont color=#00 size=2 face=Arial, Helvetica, sans-serifbr / br img src=../images/thin_line.gif width=185 height=1br br ? } } // End Ad Block ? thanks again... -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED]
[PHP-DB] print new account name on new account page?
hello, i have a form someone fills out. on submit it takes them to a new accounts page that say welcome new member. how can i get their name to print on the new page from the form they just filled out? i have been trying the following but it keeps giving me error messages regardless of how i manipulate the following. thank you for your time. addison ? include(config.php); $sql = SELECT firstName,lastName FROM accounts WHERE email='$logname'; $result = mysql_query($sql) or die(Couldn't execute query 1.); $row = mysql_fetch_array($result,MYSQL_ASSOC); extract($row); echo headtitleNew Account Welcome/title/head h2 align='center' style='margin-top: .7in' Welcome $firstName $lastName/h2\n; ? here is an example of the errors: Warning: extract() expects first argument to be an array in /users/infoserv/web/register/ca/new_account.php on line 82 -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED]
RE: [PHP-DB] print new account name on new account page?
I don't use the mysql functions anymore (look into php.weblogs.com) but I believe what you are looking for is $row['firstName'], not $firstName. (The extract MAY put them into variables for you but if it does, it's not necessary, just use the $row array. Also, tail the log file on your SQL server to make sure that the select is being executed properly. =C= * * Cal Evans * Stay plugged into your audience. * http://www.christianperformer.com * -Original Message- From: Addison Ellis [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 18, 2003 1:58 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] print new account name on new account page? hello, i have a form someone fills out. on submit it takes them to a new accounts page that say welcome new member. how can i get their name to print on the new page from the form they just filled out? i have been trying the following but it keeps giving me error messages regardless of how i manipulate the following. thank you for your time. addison ? include(config.php); $sql = SELECT firstName,lastName FROM accounts WHERE email='$logname'; $result = mysql_query($sql) or die(Couldn't execute query 1.); $row = mysql_fetch_array($result,MYSQL_ASSOC); extract($row); echo headtitleNew Account Welcome/title/head h2 align='center' style='margin-top: .7in' Welcome $firstName $lastName/h2\n; ? here is an example of the errors: Warning: extract() expects first argument to be an array in /users/infoserv/web/register/ca/new_account.php on line 82 -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Re:Re: [PHP-DB] Print data
This isn't a PHP problem - its you browser. ie has an option in its print dialog (option tab) to print framed sites out properly - don't know how the other browsers manage it... [EMAIL PROTECTED] wrote in message news:E184aOC-0002vK-00;mail.idilis.net... hy, i'm having a problem with printing the data from a html or php page... how can i solve this problem ? I mean when i'm using frames they appear or like a view with scrollbar or there is an option to print them singulary. I want to print in a format that i want..like a report ... thanks From: 1LT John W. Holmes [EMAIL PROTECTED] Date: 2002/10/23 Wed PM 02:20:35 GMT+03:00 To: José Moreira [EMAIL PROTECTED], Php Windows [EMAIL PROTECTED], Php-Db [EMAIL PROTECTED] Subject: Re: [PHP-DB] Print data hello, at my company we have several network printers and i was was wondering if it's possible to print directly to them using PHP, instead of showing on the screen or both ... to gain more control on what is printed, because of the nasty browsers header and footer ... whom i now how to remove ... i know that the printer IP is 192.192.1.100 and the port is 9005 ... The printer functions in the manual only work in windows and only work for the printer attached directly to the server. Hmm..I wonder, though, if you have a network printer that's set up to print from the server, can you use the printer functions to print to that? I'm sure the answer is in the manual. If not, maybe you can open a connection directly to the printer and send it the raw data, if you know the format. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Free Email Account at www.flash.ro -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Print data
hello, at my company we have several network printers and i was was wondering if it's possible to print directly to them using PHP, instead of showing on the screen or both ... to gain more control on what is printed, because of the nasty browsers header and footer ... whom i now how to remove ... i know that the printer IP is 192.192.1.100 and the port is 9005 ... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Print data
I think this is only available as an option if you are running on windows based hardward, but if you are...i know i've seen it in the manual. José Moreira jmoreira@e-te To: Php Windows [EMAIL PROTECTED], Php-Db rno.net [EMAIL PROTECTED] cc: 10/23/2002 Subject: [PHP-DB] Print data 10:05 AM hello, at my company we have several network printers and i was was wondering if it's possible to print directly to them using PHP, instead of showing on the screen or both ... to gain more control on what is printed, because of the nasty browsers header and footer ... whom i now how to remove ... i know that the printer IP is 192.192.1.100 and the port is 9005 ... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Print data
hello, at my company we have several network printers and i was was wondering if it's possible to print directly to them using PHP, instead of showing on the screen or both ... to gain more control on what is printed, because of the nasty browsers header and footer ... whom i now how to remove ... i know that the printer IP is 192.192.1.100 and the port is 9005 ... The printer functions in the manual only work in windows and only work for the printer attached directly to the server. Hmm..I wonder, though, if you have a network printer that's set up to print from the server, can you use the printer functions to print to that? I'm sure the answer is in the manual. If not, maybe you can open a connection directly to the printer and send it the raw data, if you know the format. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re:Re: [PHP-DB] Print data
hy, i'm having a problem with printing the data from a html or php page... how can i solve this problem ? I mean when i'm using frames they appear or like a view with scrollbar or there is an option to print them singulary. I want to print in a format that i want..like a report ... thanks From: 1LT John W. Holmes [EMAIL PROTECTED] Date: 2002/10/23 Wed PM 02:20:35 GMT+03:00 To: José Moreira [EMAIL PROTECTED], Php Windows [EMAIL PROTECTED], Php-Db [EMAIL PROTECTED] Subject: Re: [PHP-DB] Print data hello, at my company we have several network printers and i was was wondering if it's possible to print directly to them using PHP, instead of showing on the screen or both ... to gain more control on what is printed, because of the nasty browsers header and footer ... whom i now how to remove ... i know that the printer IP is 192.192.1.100 and the port is 9005 ... The printer functions in the manual only work in windows and only work for the printer attached directly to the server. Hmm..I wonder, though, if you have a network printer that's set up to print from the server, can you use the printer functions to print to that? I'm sure the answer is in the manual. If not, maybe you can open a connection directly to the printer and send it the raw data, if you know the format. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Free Email Account at www.flash.ro -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php