Page 1 of 1

New to PHP... Can this be done fairly simple?

Posted: Mon Aug 02, 2004 12:29 am
by Clenard
I'm messing around with PHP lately ever since i started hacking my VB like crazy over the past year and im in love with it! I've read several books now but i'm still confused like a normal n00b!

I build HTML Templates and i'm trying to develop a way to have a customer enter their Information through a form then Select a template from a Drop down menu and click "Go".... the outcome i need is for PHP to "print" this information to the Template they chose.

In other words their Company, Name, Copyright 2004 and any other information would be "printed" onto the template they chose for a certain amount of time...

Is this possible? and if so can someone help me by pointing me into the right direction??? i need to find this information out FAST!

here's something similar... i think it's all in JS though.

http://dollarsbydesign.com/danselmi/build3.0.html


Thanks in advance!

- Clint

Posted: Mon Aug 02, 2004 7:59 am
by CoderGoblin
Yes it is possible. At the simplest level has a template file with place markers based on the form options like "<!-- name -->" "<!-- address -->" etc and str_replace them with the values after validation or if you need letters rather than HTML consider creating it as a PDF file. References to PDF creation http://www.php.net/manual/en/ref.pdf.php

Just my 2 cents

Posted: Mon Aug 02, 2004 8:08 am
by phait
hi, just to beef up codergoblin's post there are a number of templating systems out there. You could try searchng for some of these which will give you an idea of the power they offer:

- smarty
- pattemplate
- FastTemplate

google has the links you need. Alternatively, if you go to somewhere like phpclasses.org or php.resourceindex.com then you should be able to pick up a system or two there.

HTH

Posted: Mon Aug 02, 2004 1:34 pm
by Clenard
thanks guys! i appreciate the feedback... i've downloaded a few programs and i'm just kind of studying them right now. Hopefully i can do something fairly simple by myself :)

anymore feedback would be appreciated too!

thanks