Administration
  Home arrow Administration arrow Page 4 - Talk To Me!
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ADMINISTRATION

Talk To Me!
By: Vikram Vaswani, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 1
    2001-03-12

    Table of Contents:
  • Talk To Me!
  • The Job
  • Building The Foundation
  • Mole In A Hole
  • Speak Now, Or Forever Hold Your Peace
  • Of Trees And Branches
  • Closing The Loop
  • The Last Word

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Dell PowerEdge Servers

    Talk To Me! - Mole In A Hole
    (Page 4 of 8 )

    With the table designed as per requirements, it's time to actually start writing some code. The first thing to do is to add links to the main article display page, allowing users to read and post comments.

    Let's take a look at a stripped-down version of this page, called "start.php".

    <? // important information to identify this article $section = 3; $article = 99; ?> <html> <head> </head> <body> <!-- snip! --> <font face="Verdana, Arial" size="4" color="#66CC00"> <!-- getArticleTitle($section,$article) --> Mole In A Hole </font> <p> <font face="Verdana, Arial" size="2" color="Black"> <!-- getArticleAbstract($section,$article) --> Some things just don't change - at thirty, Adrian Mole is still the whining, unfulfilled loser we first encountered at age 13. He's still writing to the BBC, he's still madly in love with Pandora, now a high-profile politician in Blair's New Britannia, his family is still as dysfunctional as ever. More in our exclusive review of the new Sue Townsend novel. </font> <!-- snip! --> </body> </html>

    Under normal circumstances, this page would receive the section and article numbers via the URL GET method, and then display the appropriate content. For example, the article entitled "Where Are We Going?" in the politics section (7) could be obtained at the URL

    start.php?section=7&article=32

    while a feature on Moscow in December could be obtained from the travel section (11) at

    start.php?section=11&article=7

    For explanatory purposes, I'll assume that the article number is 99 and the section number is 3 (entertainment, for those of you who care), and so I've hard-coded these values at the top of the page. I've also replaced a couple of function calls with their return values, again to make it easier to see what's going on.

    Now, let's add those links.

    <? // start.php // important information to identify this article $section = 3; $article = 99; ?> <html> <head> </head> <body> <!-- snip! --> <font face="Verdana, Arial" size="4" color="#66CC00"> <!-- getArticleTitle($section,$article) --> Mole In A Hole </font> <p> <font face="Verdana, Arial" size="2" color="Black"> <!-- getArticleAbstract($section,$article) --> Some things just don't change - at thirty, Adrian Mole is still the whining, unfulfilled loser we first encountered at age 13. He's still writing to the BBC, he's still madly in love with Pandora, now a high-profile politician in Blair's New Britannia, his family is still as dysfunctional as ever. More in our exclusive review of the new Sue Townsend novel. <p> <!-- snip! --> <a href="post.php?section=<? echo $section; ?>&article=<? echo $article; ?>">Comment</a> on this article, or <a href="list.php?section=<? echo $section; ?>&article=<? echo $article; ?>">view other people's comments</a> </font> </body> </html>

    As you can see, both "post.php" and "list.php" will now receive the section and article numbers via the URL GET method.

    Here's what the page looks like:



    Shameless plug - you can find a copy of the book review above at http://www.melonfire.com/, together with lots of other cool stuff. Knock yourself out!

    This article copyright Melonfire 2001. All rights reserved.

    More Administration Articles
    More By Vikram Vaswani, (c) Melonfire


     

       

    ADMINISTRATION ARTICLES

    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization
    - Advanced Concepts on Dealing with Files and ...
    - Dealing with Files and Filesystems
    - More Hacks for the User Environment in BSD
    - Personalizing the User Environment in BSD
    - Customizing the User Environment in BSD




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway