| Member 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 2 |
|
Member You - Using PHP and MySQL to Develop a Simple CMS - Version 2
Entrepreneurs Need to Know Themselves = mysql_fetch_assoc($result)){the second in a series taken from How to Evaluate and Profit from a Business OpportunityGoing into business for yourself is a big decision, one that requires careful thought and a great deal of planning. Whether you decide to buy a business, or start one from an i 11. $contents = $row['contents']; 12. } 13. ? > 14. < form name="form1" method="post" action="updatePage.php" > 15. Enter page content:< br >< textarea rows="10" cols="60" name="contents" >< ?php echo "$contents Seven Tips for Developing a Solid Networking Strategy; From the Book - Cracking the Networking CODE In version 1 of our simple CMS we introduced the following four files:Let's start with a quick reminder:Networking is NOT forcing yourself or your products on someone.Networking IS getting to know people, their lives, and their needs.Networking is NOT selling your products and services at every moment.Networking
Together, these files formed a very simple CMS, which you can download from the following address: http://www.computernostalgia.net/downloads/cms_v1.zip In this article we'll extend the CMS slightly so that the database contents are extracted and presented in the form (UpdatePage.htm). This will make it easier to edit the contents, rather than simply overwriting them. In order to make this modification, updatePage.htm needs to become a PHP file. I've called it editPage.php because updatePage.php already exists. Here is the contents of editPage.php: 1. < html > How To Work From Home And Achieve Success ollowing address:HOW TO WORK FROM HOME AND ACHIEVE SUCCESS Working from home to achieve success can be simple and is straightforward. Many people do not strive for success because they believe it is complicated but it is NOT complicated at all! People are simply unaware. http://www.computernostalgia.net/downloads/cms_v1.zip In this article we'll extend the CMS slightly so that the database contents are extracted and presented in the form (UpdatePage.htm). This will make it easier to edit the contents, rather than simply overwriting them. In order to make this modification, updatePage.htm needs to become a PHP file. I've called it editPage.php because updatePage.php already exists. Here is the contents of editPage.php: 1. < html > Taking A Look At The Business Incorporation Benefits er than simply overwriting them.Any one who has seen the abbreviations "inc" or "llc" will realize that most businesses are incorporated. However, what most people are in the dark about is the reasons why so many businesses seek incorporation or why incorporation is so valuable. There are numerous reaso In order to make this modification, updatePage.htm needs to become a PHP file. I've called it editPage.php because updatePage.php already exists. Here is the contents of editPage.php: 1. < html > Minor Sponsorships for Major Returns . < title >Really Simple CMS< /title >Sponsorship certainly conjures up an image of enormous market reach but at a mighty high price. Some of the biggest events in the world reach a market of many, many millions of people. But that's at a level where only major players are able to participate.If you ar 4. < /head > 5. < body > 6. < h1 >Really Simple CMS< /h1 > 7. < ?php 8. mysql_connect("localhost", "root", "password"); 9. $result = @mysql_query("SELECT contents from cms.page"); 10. while ($row = mysql_fetch_assoc($result)){ 11. $contents = $row['contents']; 12. } 13. ? > 14. < form name="form1" method="post" action="updatePage.php" > 15. Enter page content:< br >< textarea rows="10" cols="60" name="contents" >< ?php echo "$contents A Practical Guide to Meta Tags - Name or HTTP-Equiv? = mysql_fetch_assoc($result)){META tags are a way for you to define your web page and web site to the outside world. You can declare the keywords and description, which help your placement in search engines. In addition, you can specify who owns the copyright, how often the page is to be visited by se 11. $contents = $row['contents']; 12. } 13. ? > 14. < form name="form1" method="post" action="updatePage.php" > 15. Enter page content:< br >< textarea rows="10" cols="60" name="contents" >< ?php echo "$contents" ? >< /textarea >
Most of this file is fairly simple HTML that doesn't need explaining. However, the following bits of code are probably worth discussing. Lines 7 through to 13 containt PHP code to connect to the database and extract the contents of the web page. Line 15 contains a tiny bit of PHP code to display the contents in the form's textarea. This line shows how easy it is to integrate bits of PHP code into lines of HTML code. Remember though that in order to use PHP code in an HTML page, the file has to have an extension of .php. All of the files for version 2 of the CMS are available at: http://www.computernostalgia.net/downloads/cms_v2.zip
HTTP = HTML link (for blogs, profiles,phorums):
Related Articles:Your Customers Are Your Best Asset Back to the Basics of Affiliate Programs The Rise And Rise Of China MP3 Wholesale Distributors
|