phpmysqlquestion Posted November 10, 2011 Share Posted November 10, 2011 Hi, I'm working my way through the book at the same time I'm trying to develop some forms... so please excuse me if this is covered and I haven't seen it yet. I noticed there were several chapters dealing with database design and interacting with mysql directly (i.e., not through a web page or php). My question is: do I need to create a database with table and variable definitions within mysql before I can add records within php (from a form submission)? Or can I define the variables within the php code and insert records into a new table that isn't previously defined. I hope this is clear. Please let me know if not, and thanks in advance! (and feel free to point me to the right place if this is already covered in the book.) Link to comment Share on other sites More sharing options...
Larry Posted November 11, 2011 Share Posted November 11, 2011 Yes, you definitely need to create a database and table before adding records with PHP. You can use PHP to create a table and a database, although that is less common. Chapters 4-7 explain how to create databases and tables. Link to comment Share on other sites More sharing options...
Recommended Posts