Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-22-2011, 02:44 PM   #1
Using Debian
LQ Newbie
Registered: Mar 2010
Posts: 4

Rep: Reputation: 0
Automated Printing from PHP/MySQL web form information


I am learning PHP to take information submitted in a web-form and store it in a MySQL database, but I also need it to automatically print to the laser printer I have setup. So that a notice or printout is produced of the information.

My question is... what route do I go to automate printing from web-based information in a PHP/MySQL database?

Is it PERL ? or does PHP have a feature to do this? I am willing do to the leg work and accomplish it, I just need some insight of which software technology is going to help me accomplish my goal.
Old 03-25-2011, 07:14 AM   #2
Registered: Aug 2002
Posts: 14,761

Rep: Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478
One quick idea would be the system command to print your data saved as a file.
system('lpr -P printername datafile', $retval);
Old 03-28-2011, 01:00 AM   #3
Using Debian
LQ Newbie
Registered: Mar 2010
Posts: 4

Original Poster
Rep: Reputation: 0
I guess I would need to autosave the form to a text format then figure out a way to "monitor" the location of new files and issue a print command on them as they come in.

I guess I will need to dive in perl for this or can shell scripting pull off that kind of automation?


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
Web form retrieve <select><option> with PHP esteeven Programming 2 08-01-2009 03:18 AM
Printing with PHP/Javascript on web tooparam Linux - Software 1 01-29-2006 10:36 AM
PHP:Unable to post variables from html form to mysql database vikram_cvk Linux - Software 1 09-29-2004 03:01 PM
Post information not coming through PHP form. m3kgt Programming 5 04-02-2004 01:42 PM
Form validation problem (PHP+MySQL) linuxfond Programming 13 09-08-2003 12:11 PM

All times are GMT -5. The time now is 06:59 AM.

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