Jump to content

Simple Web Form To Access/Modify MySQL Database?


Greenie

Recommended Posts

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.
Link to comment
Share on other sites

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.

Regards
Huggie
Link to comment
Share on other sites

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. ;)
Link to comment
Share on other sites

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?
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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?
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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 :)
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.