Greenie Posted November 29, 2006 Share Posted November 29, 2006 Hey all,What do php coders usually do when they need to make their databases easy to add to and modify? I am trying to code for a project where there will be several novice users who have access to the database. I want to make some sort of html/php form to access and modify the database and I'm wondering if anyone has some insight into the best way to go about it. My main problem so far is trying to find someway of passing the names of tables to a html form. I can't seem to find a command that will select a table's name.Thanks,Greenie. Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/ Share on other sites More sharing options...
HuggieBear Posted November 29, 2006 Share Posted November 29, 2006 Is there something wrong with PhpMyAdmin? It will have all the features you need and more.If you insist on using your own, then just use mysql_query() and issue a SHOW TABLES FROM [i]dbname[/i]RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132022 Share on other sites More sharing options...
Greenie Posted November 29, 2006 Author Share Posted November 29, 2006 I'm not familiar with this PhpMyAdmin. I'll do some research on google.Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132023 Share on other sites More sharing options...
Greenie Posted November 29, 2006 Author Share Posted November 29, 2006 I've managed to find where to download this PhpMyAdmin from, yet I'm not sure in what form I should get it in. Or how to install it for that matter. Could someone please point me in the right direction? Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132048 Share on other sites More sharing options...
trq Posted November 29, 2006 Share Posted November 29, 2006 [quote]Could someone please point me in the right direction?[/quote]It comes with instructions. Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132049 Share on other sites More sharing options...
Greenie Posted November 29, 2006 Author Share Posted November 29, 2006 Thanks,thorpe. It appears I missed the installation instructions when I was scrolling through the documentation.html file.Is this tool commonly used among the php community and will I have any problems installing it on a server? Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132050 Share on other sites More sharing options...
HuggieBear Posted November 29, 2006 Share Posted November 29, 2006 As far as I'm aware, it's the most widely used web based tool, for managing MySQL databases, in fact, it's probably the most widest used full stop.It should be simple to install if you have PHP installed on the server, there are some pre-requisites as far as I'm aware, but nothing too troublesome.RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132444 Share on other sites More sharing options...
Greenie Posted November 30, 2006 Author Share Posted November 30, 2006 Alright, thanks HuggieBear. I might still try and make my own form because I have a some-what special use in mind for my database. My only concerns are to do with privacy. I don't trust myself to write a secure script. Ah well, that'll come in time, I suppose. Thanks again to all those who contributed to this thread. Much appreciated. ;) Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132481 Share on other sites More sharing options...
jsladek Posted November 30, 2006 Share Posted November 30, 2006 Greenie, Check out my prog www.iobe.net/projit's a work in progress-John Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132485 Share on other sites More sharing options...
Greenie Posted November 30, 2006 Author Share Posted November 30, 2006 Thanks, John. That was a quick reply. :)Your foreword isn't exactly encouraging. :-\ I'll have a closer look a little later, anyway. Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132494 Share on other sites More sharing options...
jsladek Posted November 30, 2006 Share Posted November 30, 2006 Actually, It's really only going to let you Access and Modify the Data. If you are looking to modify the tables then phpMyAdmin is definatly the best thing to be running.-John Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132501 Share on other sites More sharing options...
Greenie Posted November 30, 2006 Author Share Posted November 30, 2006 Ah, I see.What I'm trying to do is set up a menu using a MySQL database to store the options. I'm doing this because the menu is to be displayed in a .swf (flash file) and I don't want to have to adjust it every time there is an update - which will happen on a regular basis. So I'm thinking of storing each submenu in a table which contains it's options. I want a user of the form to first select the submenu(table) he wants to edit and then the option(table value). I can't help thinking there is a better way of doing this. I want it to be easier to create another level of submenus, but I can't see how that could be done.Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132505 Share on other sites More sharing options...
trq Posted November 30, 2006 Share Posted November 30, 2006 You really dont want to be letting users or clients play around with your database scheme. And you, as a developer need to design the database in such a way that you can easliy add new features without needing to make changes to the database schema.I think you need to read up on database normalization techniques. This will enable you to design more dynamic databases. Im sorry, but there really is no short answer here.Letting your clients modify the databases structure is allways going to lead to problems. Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132513 Share on other sites More sharing options...
Greenie Posted November 30, 2006 Author Share Posted November 30, 2006 Sorry, I wasn't vary clear on that. By 'user,' I meant one of a select few that will have administrative rights over the website in question. Normal visitors to the site will have no access to this particular form. However, now that I think about it, I don't think there's anything stopping someone accidentally stumbling across this form if I upload it to the server. I will have to protect it using some sort of password or something, I suppose.I'll be sure to read up on 'database noramlisation techniques.' Is there anything else you would recommend I take a look at? Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132514 Share on other sites More sharing options...
trq Posted November 30, 2006 Share Posted November 30, 2006 Even still, the database scheme should be designed into the application and should not need to be changed by an end user, admin or not.If you grant this sort of ability, your application WILL break eventually. Users don't know what they are doing, you as the applcation developer should. Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132518 Share on other sites More sharing options...
Greenie Posted November 30, 2006 Author Share Posted November 30, 2006 I'm sorry but I'm finding what you're saying a little hard to follow. By [i]database scheme[/i] do you mean the way in which the database is set up as far as it's tables and feilds go? Also, what are you referring to when you say [i]application[/i]? I suppose from this point on, asking "how do you do that?" is stupid and broad. I guess I have a lot to read up on. Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132519 Share on other sites More sharing options...
trq Posted November 30, 2006 Share Posted November 30, 2006 Yes, the database [i]scheme[/i] refers to the design of the database. The tables fields etc etc.The [i]application[/i] is the program you build with php to view / modify data stored within this database scheme.For instance. This forum is an application designed so that users can post new / edit there own existing and view threads. The admins of this application dont EVER need to view / edit the database schema in its raw format just to add a new forum. Of course there are allways going to be cases where you might want to add a new feature that requires some schema modification but the cases are pretty rare and the details are handled by an application developer, not an admin.It just happens to be that the admins on THIS forum are also devlopers, this forum software however could just as easily be used by a group of car enthusiests, and yes, car enthusiests couls also admin such an application. Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132520 Share on other sites More sharing options...
AndyB Posted November 30, 2006 Share Posted November 30, 2006 You might find it useful (and save yourself some headaches) to look at phpMyEdit - a utility that will generate the forms for you - display and edit.I've used it on sites where the client is very much 'dumb blonde' and they learned to use the application in a few minutes and haven't buggered anything up in several years' use.http://platon.sk/projects/main_page.php?project_id=5 Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132522 Share on other sites More sharing options...
Greenie Posted November 30, 2006 Author Share Posted November 30, 2006 Alright, thanks for clearing that up for me, thorpe. You've been a huge help. AndyB, this link looks good. Am I correct in saying that phpMyEdit and phpMyAdmin differ in that phpMyAdmin is an already-made way of controlling your database; while phpMyEdit creates forms that you will then use to control your database? Or maybe I've got the wrong impression.Just to ask agian, do you have any recommended reading? I've already checked out most of the tutorials and articles here on phpfreaks.com that I could understand or find any relevance in. Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132525 Share on other sites More sharing options...
jsladek Posted November 30, 2006 Share Posted November 30, 2006 Nice Andy, this is similar to what I am building. I'll have to test that phpMyEdit out and see if I can get any ideas.-john Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132526 Share on other sites More sharing options...
AndyB Posted November 30, 2006 Share Posted November 30, 2006 phpMyEdit - I got fed up trying to creating bombproof applications for bozo clients to adjust stuff in their database. Considering that phpMyEdit does the whole thing for you in a few seconds, and that there are a zillion things you can really do with it (if you actually read the documentation) to spice it up function-wise, I'd recommend it in a flash. I've used it on more than a dozen client sites and never had a complaint from anyone.Of course, you still need to have a rational database and table structure :) Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132530 Share on other sites More sharing options...
Greenie Posted November 30, 2006 Author Share Posted November 30, 2006 Is it still worth learning how to achieve the same result without the use of these programs, do you think? I really want a firm basis in PHP and I'm wondering if using these programs will stop me from learning all I really should know. Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132535 Share on other sites More sharing options...
jsladek Posted November 30, 2006 Share Posted November 30, 2006 I'm like you Greenie, I like to learn how this stuff works. Even though I am a newbie, I know enough to be dangerous to myself and others. I think a lot of the stuff out there does confuse more than anything but lately I have been thinking about learning to use at least one popular development program like cakephp http://www.cakephp.org/. The reason behind this is I figure that from a business prospective I would like to have my site developed using an environment that would be farmiliar to many developers. If a programmer builds an entire site from scratch and he needs to be replaced then the next programmer will have to figure out what the previous programmer did before continuing. I would expect that a common environment might speed up the process.-John Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132542 Share on other sites More sharing options...
Greenie Posted November 30, 2006 Author Share Posted November 30, 2006 I agree with you, jsladek. I'm here to fit into the community, not go against it and do my own thing. This CakePhp is interesting but again I find myself faced with phrases I don't really understand. For example, the site claims:[quote]Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.[/quote]What exactly do they mean by 'framework'? Some sort of set of rules or a procedure used to develop php websites or some sort of formatting system? And what are these 'design patterns' all about? Quote Link to comment https://forums.phpfreaks.com/topic/28837-simple-web-form-to-accessmodify-mysql-database/#findComment-132548 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.