Generate form

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
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Generate form

Post by S_henry »

I want to make a system to generate form. There are 2 type of form (eg. leave, claim). I have made the template for each form (eg. leave.php, claim.php). In the main page, the system will ask user (eg. john) to input his personal info (eg. name, address, etc). Then after user finish input all the infos and click submit button, i want the system create the files (form files such as johnleave.php, johnclaim.php) based on the template. For example, johnleave.php is the file (leave form) that contain john's info on it. After system finish generate those form, system will save those files (johnleave.php, johnclaim.php) into a provided folder (eg. john). So anybody got any idea to do this pls? Don't hesistate to ask me if my explanation is still not clear enough.
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Post by S_henry »

Anybody got any idea pls?
method_man
Forum Contributor
Posts: 257
Joined: Sat Mar 19, 2005 1:38 am

Post by method_man »

so you want it to make a .php file for each person that registers?
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Post by S_henry »

Yes. Something like that. Let say john is using the system. When john finish enter all his info and click submit button, then at this time, the system will start to generate the files (based on the template) and save it into a folder. You got any idea?
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Post by S_henry »

The main points here are:

- generate the files based on the template (with user info)
- save the generated files into folder

Hopefully got anybody can help me..
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Post by S_henry »

Still no response.. :cry:
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

do some searching for templating as there is lots of info about it.
It is just generally substition and then saving the newly created variable as a file.

lots of info an this site as well.
Post Reply