PHP
  Home arrow PHP arrow Client Management for a PHP Invoicing ...
Dev Shed Forums 
Administration  
AJAX  
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 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
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? 
PHP

Client Management for a PHP Invoicing System
By: Leidago
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 13
    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:
      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


    Client Management for a PHP Invoicing System


    (Page 1 of 5 )

    What's an invoicing system that can't manage the data for the clients you're invoicing? This article, the third of four parts, shows how to make managing your clients easy. This part of the system allows you to view a full list of client names, and add, update or remove clients from your database.

    It is up to you how much information about clients you want to keep. As far as this article is concerned, I will only keep the information that is needed to run an invoice system. The obvious information to store about clients is name, address, email, phone number and of course the date that you started working with the client. You are very limited in what you can do with client information, in fact the few things you can do are add a new client, and remove, update, and view client data. 

    So let's create a table that will reflect this information:

    CREATE TABLE `client` (
      `id` int(4) unsigned zerofill NOT NULL auto_increment,
      `name` varchar(100) NOT NULL default '',
      `address` text NOT NULL,
      `date_added` date NOT NULL default '0000-00-00',
      `email` varchar(100) NOT NULL default '',
      `contact_name` varchar(100) NOT NULL default '',
      `phone_no` varchar(60) NOT NULL default '',
      PRIMARY KEY  (`id`)
    ) TYPE=MyISAM AUTO_INCREMENT=12 ;

    Simply copy and paste the above code into your MySQL clients' SQL window and run the SQL. Once the table has been created and it's all working, create a new PHP document and save it as "allclients.php." This page will list all the clients in the database. At the very top of the page, add the following code:

    Code7 allclients.php

    <?
    include "config.php";
    $query_clients = "SELECT * FROM client ORDER BY id DESC";
    $result_clients = mysql_query($query_clients);
    $num_clients = mysql_num_rows($result_clients);
    ?>

    The above code simply retrieves all the client data from the database. The retrieved number of rows is stored in the "$num_clients" variable.

    More PHP Articles
    More By Leidago


       · A couple of things:- shorttags will not work on all servers. It's always better to...
       · What tags are you referring to? And also where exactly is escaping not...
       · With shorttags I mean <? instead of the full tags <?php (hope that comes through the...
       · Thanks will keep this in mind.
     

       

    PHP ARTICLES

    - Validating Web Forms with the Code Igniter P...
    - Output Buffering
    - Paginating Database Records with the Code Ig...
    - HTTP Headers in Web Development
    - Project Management: Administration
    - Building a Database-Driven Application with ...
    - User Authentication for a Project Management...
    - Introduction to the CodeIgniter PHP Framework
    - Adding Users for a Project Management Applic...
    - Migrating Class Code for a MIME Email to PHP...
    - Login and Logout Authentication for a Projec...
    - Composing Messages in HTML for MIME Email wi...
    - Project Management: Authentication
    - A Better Way to Determine MIME Types for MIM...
    - Project Management Overview





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