Log in

View Full Version : how can I embed the ecard script into the web page



jackson
01-15-2009, 09:08 AM
I am using an open source e Commerce shopping cart to sell product. I want to offer an ecard service to my customers. Both of the script are using PHP. My shopping cart has same header (menu bar)and footer for all of pages.

My question is how can I embed the ecard script into the page with my shopping cart's header and footer so as it will have the same look?

Thank you for all of your help.

jackson
01-21-2009, 04:01 AM
I copied the header and footer of my shopping cart and paste them into my ecard header and footer section. Now it looks like the ecard script is part of my shopping cart and I am very happy about it.

Just for my learning experience, can someone tell me if this is the right way to do? Some people said used iframe, but a lot of people said iframe is bad. What is a right way to embed a script to a web site? Can I use PHP include to point it to my ecard script? I have tried to use this code <? include("ecard/index.php") ?>, but it did not work, then I used <? include("http://www.mysite.com/ecard/index.php") ?>, it did not work either. What have I done wrong? Does the <? include("filename.php") ?> has to be in between <head> </head> in the html page? Or can it be in the body page?

Thank you in advance for all of your help.

bluewalrus
01-21-2009, 04:56 AM
If thats not working in either place try adding the whole php tag like: <?php yada yada yada ?>

For more info on includes:
http://www.w3schools.com/PHP/php_includes.asp
http://us.php.net/include/

jackson
01-21-2009, 04:31 PM
If thats not working in either place try adding the whole php tag like: <?php yada yada yada ?>

For more info on includes:
http://www.w3schools.com/PHP/php_includes.asp
http://us.php.net/include/


Thank you very much for your reply. Will try.