jebulan Posted December 29, 2005 Posted December 29, 2005 I would like to create a database per (registered) user with multiple tables. Can I automate this process by creating the database via php? The databases created with cpanel have my username prefixed. Is this a function of cpanel? or something else behind the scenes?. If i am able to create databases via php, should i create the database with or without the prefix within my code? If this sounds like a bad idea, or if I'm monkeying with things that shouldn't be monkeyed with let me know. Quote
TCH-Andy Posted December 29, 2005 Posted December 29, 2005 Welcome to the forums You can't easily create a database from a php script - you need to go into cpanel to create it. All of your databases need to have your cpanel username as a prefix, so yes you do need it. I'm always worried slightly about automatically creating things by any (even registered) user. Simply because of the security issues it opens up. It does depend on what you want to actually do of course, and how secure your script is. If we were to take a worse case example of email accounts - then you could enable a spammer to do their nasty work - and it's your whole account that then gets suspended (and the spammer won't care, they will just move on). There are automatic scripts you can do securely but they just need to be checked, hence my slight note of warning Quote
stevevan Posted December 29, 2005 Posted December 29, 2005 Welcome to the forums! I agree with Andy on this one. While it would make your life easier, it could also potentially make the life of someone with evil tendencies easier too! Quote
jebulan Posted December 30, 2005 Author Posted December 30, 2005 Thanks All, That's kinda what I thought. Quote
coleary Posted January 2, 2006 Posted January 2, 2006 Is there any specific reason why you wanted to use this method for newly registered users? SQL storage is generally very flexible. I can probably help you come up with a better solution. Quote
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.