blarg
blarg

Reputation: 3893

How to send data from MYSQL/PHP to a Coldfusion component?

I'm trying to create functionality to output pages generated from MYSQL queries in PHP as PDF files.

To do this I need a way of wrapping up this data that is placed into dynamic tables and placing it between the tags, so it can be converted into a clean PDF.

I'm not sure where to start with this other than the coldfusion component will be called from the PHP page, rather than the other way round as I originally envisaged.

Upvotes: 0

Views: 211

Answers (2)

Seybsen
Seybsen

Reputation: 15587

I would pull the dynamic content from your php scripts like this:

<CFDOCUMENT format="pdf" src="url-to-php-script.php" mimetype="text/html" filename="#expandpath("your.pdf")#" />

Upvotes: 4

Dan Bracuk
Dan Bracuk

Reputation: 20804

The part where the Coldfusion Component gets called by php is pretty simple to accomplish. Inside the the cfc you will have functions. If you make the access property = remote, that function will be available as a web service.

<cffunction name="NameOfFunction" access="remote" returntype="something">

Upvotes: 1

Related Questions