PHP
  Home arrow PHP arrow Page 3 - Client Management for a PHP Invoicing System
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

Client Management for a PHP Invoicing System
By: Leidago
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 14
    2006-09-20


    Table of Contents:
  • Client Management for a PHP Invoicing System
  • Building a table
  • Deleting clients and viewing their details
  • Updating client information
  • Adding a new client

  • 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


    Client Management for a PHP Invoicing System - Deleting clients and viewing their details
    ( Page 3 of 5 )

    Delete Client

    Simply deletes a client from the database:

    <?
    include "config.php";
    if(isset($_GET['cid'])){

    $query = "DELETE FROM client WHERE id = '".$_GET['cid']."'";
    if(mysql_query($query))
    {
    header("location:allclients.php");

    }else{
    echo mysql_error();
    }

    }
    ?>

    View Client Details

    Shows the client information, this is done by sending a client id to the cdetails.php page:

    <?
    include "FCKeditor/fckeditor.php";
    include "config.php";
    if(isset($_GET['cid'])){
    $query_clients = "SELECT * FROM client WHERE id = '".$_GET
    ['cid']."'";
    $result_clients = mysql_query($query_clients);
    $num_clients = mysql_num_rows($result_clients);
    $clients = mysql_fetch_assoc($result_clients);
    }
    ?>

    Once the script receives the client id, it searches for that client and shows it in an HTML table:

    <table width="100%" border="0" cellspacing="1" class="block">
            <tr>
              <td colspan="2"><table width="100%" height="19"
    border="0">
                <tr class="heading">
                  <td width="22%"><a href="Main.php" class="link">
    [MENU]</a></td>
                  <td width="17%"> <a href="allclients.php">CLIENT
    LISTINGS</a> </td>
                  <td width="24%">USER:<?=$user;?></td>
                  <td width="37%"><a href="logout.php"
    class="link">LOGOUT</a></td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td width="46%"><?=$clients['name'];?> </td>
              <td width="54%">Date Added:<?=$clients['date_added'];?> </td>
            </tr>
            <tr>
              <td><?php
    $oFCKeditor = new FCKeditor('address') ;
    $oFCKeditor->BasePath = 'FCKeditor/';
    $oFCKeditor->Value = $clients['address'];
    $oFCKeditor->Create() ;
    ?></td>
              <td><a href="edClient.php?cid=<?=$clients['id']?
    >">Update Details </a></td>
            </tr>
          </table>

    There is also a link to update the client information if you so wish.



     
     
    >>> More PHP Articles          >>> More By Leidago
     

       

    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 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek