LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 04-06-2005, 11:48 PM   #1
joseph
Member
 
Registered: Jul 2003
Location: Batam
Distribution: Ubuntu 10 And Linux Mint
Posts: 414

Rep: Reputation: 30
PHP : Send Data To Printer


Dear All,

Simple question but i can't find the answer.
anyone know is the php able to send the data that we have retrieve from mysql to printer??
what is the script??

thanks
 
Old 04-07-2005, 05:29 PM   #2
Spudley
Member
 
Registered: Mar 2003
Location: Berkshire, England.
Distribution: SuSE 10.0
Posts: 299

Rep: Reputation: 32
I'm assuming your script works like most PHP, and produces a web page to be viewed in a browser.

In that case actual PHP code won't help, because the printing is done at the client side (ie the browser). What you would need to do is include a small amount of Javascript in your HTML output.

Something like this....
Code:
<script language="javascript">
<!--
window.print();
// -->
</script>
Putting that script into your page (at the end of the HTML) will cause the browser to pop up it's print dialog immediately once the page is loaded.

Hope that helps
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to send data from kernel to user thegreatest Programming 5 11-23-2005 07:55 AM
Send data to the keyboard buffer rrodrigues Programming 5 07-20-2004 10:26 AM
getting ENOBUFS while trying to send data arb Programming 0 09-19-2003 07:52 AM
Dialing only when there is data to send via PPP ruchika Linux - Software 6 09-10-2003 12:30 PM
How to Send data to the parallel port lambada Programming 2 02-12-2003 10:30 AM


All times are GMT -5. The time now is 09:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration