PDA

View Full Version : How to print a ticket in my web site?


lawrencehing
09-24-2002, 03:35 AM
Hi, anyone can help me?
Now i doing my final project, and i would like to print out the ticket in my web site that i developed.
The ticket just like a movie ticket, how to print it out with the picture file (jpeg) with the text on that picture which i retrive data from the database.

Hope anybody can help me....

Thanks

Spookster
09-24-2002, 03:57 AM
Since this sounds like a school assignment we cannot write the code for you. However we can gladly steer you in the right direction.

This is actually rather simple. PHP has the ability to generate images on the fly. So the concept would be, retrieve the data from your database then generate an image with the text you got from your database.

How you create the image is another story. This all depends on what PHP modules your sysadmin has installed on the server. The most common module is the GD library which will probably already be on your server. Others are ImageMagick I believe is the name.

Here are some links to get you started:

http://www.zend.com/zend/tut/dynamic.php

http://www.zend.com/codex.php?id=188&single=1

http://www.devshed.com/Server_Side/PHP/ImageGeneration/page1.html