home *** CD-ROM | disk | FTP | other *** search
/ Practical Internet Web Designer 89 / PIWD89.iso / pc / CONTENTS / DEVELOPER / TUTORIAL_FILES / Pages90-91 / admin / index.php < prev   
PHP Script  |  2003-11-24  |  1KB  |  41 lines

  1. <?php
  2. //connect to the database
  3. $conn = mysql_connect("localhost","root","pwd");
  4. //choose the cms db
  5. mysql_select_db("cms", $conn);
  6. //query the database for a list of categories
  7. $result = mysql_query("SELECT catID, catName, catDesc FROM tblCat", $conn);
  8. ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  9.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  10.  
  11. <html>
  12. <head>
  13. <title>CMS Homepage</title>
  14. <link rel="stylesheet" type="text/css" href="../global.css" />
  15. </head>
  16.  
  17. <body>
  18. <div id="banner">
  19. <p> </p>
  20. </div>
  21. <div id="navigation">
  22. <ul class="main">
  23. <li><a href="add.php">Add Content</a></li>
  24. <li><a href="edit.php">Edit Content</a></li>
  25. </ul>
  26. </div>
  27. <div id="content">
  28. <h1>Administration</h1>
  29.  
  30. <p>Administer your content from here.</p>
  31. <p><a href="add.php">Add Content</a><br />
  32. Add new content pages to the database.</p>
  33. <p><a href="edit.php">Edit Content</a><br />
  34. Edit pages that already exist in the database.</p>
  35.  
  36. </div>
  37. </body>
  38. </html>
  39.  
  40.  
  41.