Page 1 of 1

Anyway to do this?

Posted: Mon Aug 04, 2003 4:59 pm
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

Posted: Mon Aug 04, 2003 5:44 pm
by m3rajk
yes. when you insert into sql, follow it up with the commands to make the directory nad to copy the template files

Posted: Mon Aug 04, 2003 6:38 pm
by Pocketx
Oh, but only problem is, i have no idea :S

Posted: Mon Aug 04, 2003 8:26 pm
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