Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Include PHP File in Product Description


clint

Recommended Posts

Hi All,

 

Is there a way to include a PHP file in the product description and have it execute?

 

I have a file that processes entries in a database and wish to use that to generate the product description field. I have tried using php include eg. in the product description field I put:

 

<? include 'gen_details.php?id=1'; ?>

 

The product page just showed the above and didn't execute it..

 

Any suggestions?

 

Thanks!

 

Clint

Link to comment
Share on other sites

You are confusing client side HTML and server-side php.

outputting stuff to the browser cannot possibly casue a script to execute server-side.

 

Ahhh I see now. Thanks!

 

I managed to solve the problem by editing product_info.php to do the include.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...