| Advice You |
Hubs | Hubbers | Topics | Request |
| #1 in Business | Subscribe Email Print |
|
You are here: Home > Internet and Businesses Online > Web Development > Using PHP and MySQL to Develop a Simple CMS - Version 1 |
|
Advice You - Using PHP and MySQL to Develop a Simple CMS - Version 1
In this article I'll try to describe how to develop a very simple Content Management System (CMS). I've chosen PHP as the server-side scripting language and MySQL as the database management system purely because I think they are fairly easy to use and they do the job very well. I won't spend any time describing CMSs, what they are, or why you should or shoul According to USFDA, a combination product is one composed of any combination of a drug and device; biological product and device; drug and biological product d not use them as there are plenty of excellent articles on this site that describe them perfectly well. I'll just explain one way of developing one. This CMS consists of a single web page (index.php) that can have its contents updated by use of a standard form (updatePage.htm). The contents entered via the form are stored in a database, and are accessed and ; or drug, device, and biological product and fixed dose combination would include two or more combinations of drug. Examples of combination products may in displayed by the web page. Although this CMS is too simple to be of any real use, it could be used as the starting point for a real life CMS solution. In subsequent articles I'll look at various ways to extend the CMS to make it more useful. There are four files in this project:
lude drug-coated devices, drugs packaged with delivery devices in medical kits, and drugs and devices packaged separately but intended to be used together. dex.php
cms.sql This file creates a database called cms, and creates a table in that database called page. It also loads some intial data into the table. You only need to use this file once. updatePage.htm This web page contains a simple form that can be used to enter the contents displayed by index.php. updatePage.php This is th here is enormous increase in the number of combination products entering the market in the recent years. Combination products have proven advantages but fixe form handler - the script that processes the data (entered in updatePage.htm) and inserts it into the database table (page). index.php This is the web page that displays the data held in the database table. You can download a zip file containing these four files from http://www.computernostalgia.net/downloads/cms_v1.zip cms.sql 1. CREATE DATA d dose combinations are still in the process of convincing regulatory authority on their advantages over the single ingredient formulations. Combination pro ASE cms; 2. USE cms; 3. CREATE table page ( 4. pageID integer auto_increment, 5. contents text, 6. primary key (pageID) 7. ); 8. insert into page (pageID, contents) values ('1', 'dummy text'); Line 1 creates a database called cms in the MySQL database management system. Line 2 tells MySQL to use the database fo ucts have become life saving products for the pharmaceutical companies who doesn’t have many innovative molecules in their product pipeline and have been inc r the subsequent commands. Line 3 creates a table in the database. Line 4 creates a column called pageID, which will contain integers, and which will be automatically incremented as new records are added to the table. As we only have one web page (index.php) in our imaginary website, we will only have one record and therefore one integer: 1. If we added add easingly used in the product life cycle management. Even the companies having product patents are trying to extend their product life cycle through the combi tional pages to the table, they would be automatically numbered (2, 3, 4, etc). Line 5 creates a second column called contents, which will contain text. This is where the editable contents displayed by index.php will be stored. Line 6 sets pageID as the primary key, which you can think of as a reference for the table. As we only have one table, which will c nation products and maximize the revenues. But the companies involved in this practice are overlooking that they are burdening the patients both economically ntain only one record, we won't make any use of the key. I've included it though because it's good practice to do so. Line 7 simply closes the bit of code that was started in line 3. Line 8 inserts some intial data into the table: 1 as the first (and only) pageID, and 'dummy text' as the contents of the first record. updatePage.htm (Note that fo and physically. They need to rightly judge the benefits of the combination products and they have to even look at the risks involved when combining the produ display considerations, I've inserted spaces into the HTML tag names, otherwise they would be processed as HTML code.) 1. < html > 2. < head > 3. < title >Really Simple CMS< /title > 4. < /head > 5. < body > 6. < h1 >Really Simple CMS< /h1 > 7. < form name="form1" method="post" action="updatePage.php" > 8. Enter page c ts. Some of the combination products were well accepted by physicians while others suffered. Companies involved in development of combination products are fi ntent:< br >< textarea rows="10" cols="60" name="contents" >< /textarea > 9. < input type="submit" name="Submit" value="Update Page" > 10. < /form > 11. < /body > 12. < /html > This is just standard HTML, which probably doesn't really need explaining. All it does is present a form, the contents of which are sent to updatePage.php wh ding difficulty in defining their combination products and facing various challenges from selecting a combination to marketing it. Following aspects would a en the 'Update Page' button is clicked. updatePage.php 1. < ?php 2. $contents=$_REQUEST['contents']; 3. mysql_connect("localhost", "root", "password"); 4. $result = @mysql_query("UPDATE cms.page SET contents='$contents'"); 5. mysql_close(); 6. ? > This is the form handler, that's to say, the script that processes the dat dd to the challenges in developing combination products: Which markets to tap where the combination products can do fairly well? Which combination prod entered into the form (in updatePage.htm). Line 1 signifies the start of a PHP script. Line 2 requests the contents that were posted from the form. We could have written $contents=$_POST['contents']; instead if we had wanted to. Line 3 connects to the MySQL database server, setting up the host name, which I've assumed to be localhost, the datab cts are meaningful and rational? Which therapeutic categories to select? Which Combinations can address unmet needs of the patients? Do combin se user, which I've assumed to be root, and the password needed to connect to the database. I have no idea what this would be for your system so I've just written the word password. Line 4 updates the page table in the cms database with the new contents. Line 5 closes the database connection. Line 6 closes the PHP script. in tions increase the patient compliance? What would be the developing cost? How to tackle the risks encountered during combination product developmen ex.php 1. < html > 2. < head > 3. < title >Home Page< /title > 4. < body > 5. < h1 >Home Page< /h1 > 6. < ?php 7. mysql_connect("localhost", "root", "password"); 8. $result = mysql_query("select contents from cms.page"); 9. while ($row = mysql_fetch_assoc($result)){ 10. $contents = $row['contents']; 11. t? As combination products don't fit into the traditional categories of drugs, medical devices, or biological products, the USFDA is in the process of devel 12. echo $contents; 13. ? > 14. < /body > 15. < /html > This is the web page that displays the contents from the database. It's called index.php rather than index.htm because the web page contains PHP code. If the page was called index.htm, the PHP preprocessor, which is part of the web server, would not know tha ping new procedures for reviewing their safety, efficacy and quality. Professional from academic institutions, pharmaceutical industries, health care indust t the page contained PHP code, and would therefore not try to process the script part of the page (lines 6 to 13). This would cause the script itself to be displayed in the browser rather than the HTML generated by the script. Most of the lines in this web page are pretty straight forward and don't need explaining. Lines 6 to 13 contain the PHP script that e y and representatives from various regulatory agencies are working out to design the regulatory requirements for manufacture and sale of combination products tracts the contents from the database and displays (echos) it in the browser. Installing/Running the CMS To use the CMS you need to copy the files onto your web server into the area allocated for web pages. Your web server needs to support PHP and MySQL; if it doesn't, the CMS won't work. You also need to use the correct database connection names an . As there is an increasing trend of the combination products companies manufacturing such products should be able to tackle the problems involved in the de passwords (those used in the mysql_connect lines in the PHP scripts). Exactly how you run the cms.sql file to set up the database and database table will vary from web server to web server so it's difficult to give precise instructions here. If you have a phpMyAdmin icon or something similar in your web servers control/administration panel you should be abl elopment. They need to be wiser in analyzing the market trends and the regulatory requirements. Companies that provide selfless information through particip to use that. Once you've set up the database and table, you can simply browse to the updatePage.htm web page and update the database contents. You can then browse to the index.php page to view the updates. If you have any problems or comments regarding the CMS, please email me at johndixon@computernostalgia.net and I'll be pleased to assist you if possible tion in industry events and feedback to regulatory authorities would be able to face the challenges and will be successful in developing combination products
HTTP = HTML link (for blogs, profiles,phorums):
Related Articles:Storm Water Management Products How Google's Adwords Can Be an Attorney's Best Friend
|