PHP
  Home arrow PHP arrow Page 2 - HTML for a Project Management Application
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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? 
Google.com  
PHP

HTML for a Project Management Application
By: David Web
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 5
    2008-06-09


    Table of Contents:
  • HTML for a Project Management Application
  • Code Explained
  • Source Code for the Page
  • PHP explained

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    HTML for a Project Management Application - Code Explained
    ( Page 2 of 4 )

    So what does the code in the previous section actually do? There are two rows of the table that need to be displayed based on the outcome of the $level variable check:


    <?php if($level =="admin"){?>


    If the value of the $level variable is admin, then the section of the code that you see above is built and displayed, based on the number of returned values from the query that we ran in the PHP portion of the page. The $num_admin variable is used in a while loop to extract the project name, status and creation date of the projects concerned. These details are then displayed in the resulting table rows that are created by this loop:


    <tr>

    <td><a href="view_project.php?pid=<?php echo $rowadmin['pid']?>"><?php echo $rowadmin['title'];?></a></td>

    <td><?php echo $rowadmin['status'];?></td>

    <td><?php echo $rowadmin['create_dt'];?>

    </td>

    </tr>


    Notice that there is also a dynamic hyperlink created with the title of the project. This link will enable the user to view the project concerned in detail when it is clicked. If the $num_admin variable value is zero -- in other words, no records could be found for this user -- then another dynamic table row is built to display this message:


    }else{ ?>

    <tr>

    <td colspan="3"><p>There does not seem to be any projects registered in your name. Click on the "Create New Project" link to create a project.</p></td>

    </tr>

    <?php

    }?>


    If the $level variable contains the "normal" value, then exactly the same sequence of events as described above occurs, except that the key variables that are used for the "while" loop and the variable used to extract the results of the query is different. Also, the records retrieved are specific to the logged-in user's ID. In other words, only the projects with a user ID that is the same as that of the logged-in user will be retrieved and displayed.

    That is all there is to the main page. The next page deals with looking at a particular project in detail. In fact, the hyperlink that is created by the dynamic table above opens this page when it is clicked, and lists all the details of a project. It lists how many staff are working on the project, their names, and the names of the files that are used in the project. Below is a screen shot of what the page looks like:




     
     
    >>> More PHP Articles          >>> More By David Web
     

       

    PHP ARTICLES

    - Implementing Factory Methods in PHP 5
    - Merging a File Split for FTP Upload using PHP
    - Getting Data from Yahoo Site Explorer Inboun...
    - Method Chaining: Adding More Selecting Metho...
    - How to Split a File During an FTP Upload Usi...
    - Expanding a Custom CodeIgniter Library with ...
    - Using the Yahoo Site Explorer Inbound Links ...
    - Building a CodeIgniter Custom Library with M...
    - Building an E-mini Trading System Using PHP ...
    - Completing the MySQL Class with Method Chain...
    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek