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
New to PHP... Can this be done fairly simple?
Moderator: General Moderators
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
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
Just my 2 cents
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
- 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