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!
i want to create a table which my site user will specify. for example a site user enters table name rockson and request is sent through GET method then it should create the table with this name in my database. i have created a php page as following but it is not working.( included files are correct and tested ) please help. please some1 post the code for it.
This seems like a terrible idea. You shouldn't let users create tables. Unless you have a good reason for this, I just can't imagine what that would be. There is probably an error in your database structure, or how you imagine a database should be created. Perhaps you should look at how a relational database works.
As far as what you really asked for, your syntax error is here. Remove the single quotes around tbn. When you use an array in magic quotes you don't need the single quotes.
Kurby wrote:This seems like a terrible idea. You shouldn't let users create tables. Unless you have a good reason for this, I just can't imagine what that would be. There is probably an error in your database structure, or how you imagine a database should be created. Perhaps you should look at how a relational database works.
As far as what you really asked for, your syntax error is here. Remove the single quotes around tbn. When you use an array in magic quotes you don't need the single quotes.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.