Anyway to do this?

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
User avatar
Pocketx
Forum Commoner
Posts: 37
Joined: Fri Aug 23, 2002 9:54 pm

Anyway to do this?

Post by Pocketx »

Hey, I have a question

Is there anyway that when somebody insert a query into the mySQL tables, a directory is created and creates a default template and the file is named index.php, characters.php ect.????

Example:

User1 enters the following information:

Name: Cool Game

Then, the PHP creates a directory based on the name field.. Which then it will create http://dsa.com/Cool Game/

Then, in /Cool Game/, there is index.php, characters.php ect. Which has a default template..

------------------------------------------------------------

2nd question. Is there anyway when a person inserts a query, it creats edits a specific file?

Example:

File To Edit (Drop Down): characters page, index page
Game Name (Text Box): COol Game
Author (Text Box): User1
Characters (Text Box): Bah, Sah, Rah

Then there are variables on index.php, ect. that contains curtain variables that displays the records in the mySQL table??

Sorry, but i couldnt get any tutorials on this
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

yes. when you insert into sql, follow it up with the commands to make the directory nad to copy the template files
User avatar
Pocketx
Forum Commoner
Posts: 37
Joined: Fri Aug 23, 2002 9:54 pm

Post by Pocketx »

Oh, but only problem is, i have no idea :S
Drachlen
Forum Contributor
Posts: 153
Joined: Fri Apr 25, 2003 1:16 am

Post by Drachlen »

http://www.php.net/manual/en/function.mkdir.php
http://www.php.net/manual/en/function.copy.php

Those should do the trick. the manual is your friend, type in what you think it might be called, and you find what you're looking for....most the time
Post Reply