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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Clenard
Forum Newbie
Posts: 2
Joined: Mon Aug 02, 2004 12:29 am

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

Post 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
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post 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
phait
Forum Commoner
Posts: 46
Joined: Wed Apr 07, 2004 4:41 am
Location: watford / leicester, UK

Post 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
Clenard
Forum Newbie
Posts: 2
Joined: Mon Aug 02, 2004 12:29 am

Post 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
Post Reply