LaughingQuoll Posted June 28, 2014 Share Posted June 28, 2014 I was wondering how I could have a PHP script that would run on a special directory each day to see if there are any new entries to a MySQL database. If there were new entries it would create a new web directory using the name of the new entry with a default index.php inside. I have googled around and cant seem to find out how to do it. Quote Link to comment Share on other sites More sharing options...
Jacques1 Posted June 28, 2014 Share Posted June 28, 2014 I think you're missing the whole point of web programming languages like PHP. The reason why we use PHP is because we do not want tons of static files for different pages. We render the HTML dynamically. So if your content is in a database, you fetch the data, assemble the page and display it. Quote Link to comment Share on other sites More sharing options...
LaughingQuoll Posted June 28, 2014 Author Share Posted June 28, 2014 @Jacques1 I was just wondering how i could do it. If you know a better way to do it please tell me. Quote Link to comment Share on other sites More sharing options...
Jacques1 Posted June 28, 2014 Share Posted June 28, 2014 Like I said, you render the pages dynamically. It might be a good idea to start with a smaller project so that you get used to the idea of dynamic websites. Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted June 30, 2014 Share Posted June 30, 2014 If you know a better way to do it please tell me. It's difficult to know what you're trying to do based on the information provided. We might be able to help if you let us know what you're database looks like and describe what the expected output should look like. In case you're unfamiliar with building dynamic pages in PHP, the following video may help with the basics: Note that this is an older video which uses the deprecated mysql_* function. At some point in the near future, you'll need to use MySQLi or PDO if you're not doing so already. More information can be found here: http://www.php.net/manual/en/mysqlinfo.api.choosing.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.