Copy link to clipboard
Copied
Hi,
I want to code some pages in PHP to print data retreived from a database. I've done this in VB, but want to know if this can be done in PHP.
Thanks in advance.
Copy link to clipboard
Copied
I won't say that it is so simple because you are beginner for PHP. So i will recommend you to go through this process. Search these keywords on google and read them.
1- PHP echo() and PHP print() or PHP hello world example
2- MySql connect, mysql select db etc.
3- MySql fetch object function
4- While loop & print_r() function
5- Mysql insert, update, delete query examples
6- Download xampp or download wamp
Note: You can take a good start, i tried to guide you in correct order. Please search and study each keyword separately, i have written few in with & but still they are separate topics
You should have php manual chm file as well or you can call it php user manual. PHP manual can help you to boost up the development process. Have a look on this article as well php manual chm.
Copy link to clipboard
Copied
Hi, I should have said that I know php quite well bit it's only the printing aspect. I want to see if I can print at a specific coordinate: I will check your info and update this post tomorrow thanks.
Copy link to clipboard
Copied
If you are trying to print through printer so you have to format your html page as it should be like a document. Then use this code:
<script language="javascript" type="text/javascript">
window.print();
</script>
you can use this JS function inside a function and then call it through an event like onClick etc. In fact printing in PHP quickly reminds you echo() print() etc. but if you want to print it through printer so obviously we have to take advantage of client side scripting.