My web site - How It Works Let s take a look at

How It Works Let s take a look at admin.php: require( config.php ); Now you should see why you put the connection values in a separate file. By doing this, all you need is a single line to include the constants, and you can use them in this page. Let s pause here for a moment and talk about form submittal. A common practice is to post a form back to itself, and you certainly could have done that here. When your page contains data that needs to be inserted into a database, however, you need to think twice about a self-posting form. If the user were to refresh or reload the page, all of your database functions would run again, and that could be disastrous. You would end up with duplicate data, or delete records you didn t mean to delete. Obviously, you don t want anything like that to happen, so to minimize the probability, you post to a separate form called admin_transact.php. This page handles all of the necessary database transactions, and then redirects back to the page from which you came. If the user reloads the page at that point, no harm will come to your database.

You might notice that all of your buttons have the same name, action, each with a different value. When posting the form, you will be accessing the $_POST[ action ] variable to see which button was pressed, and perform the appropriate actions. This allows you to use one script for multiple transactions, rather than having to create a page with multiple forms, each posting to a different transaction page. Now you get all of the mailing lists available and wrap them in option tags so that they will appear on your page in a drop-down select box.

493 Mailing Lists
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

Leave a Reply