Results 1 to 4 of 4

Thread: Want to edit a php file from my php site

  1. #1
    Join Date
    Mar 2009
    Location
    Chennai, India
    Posts
    77
    Thanks
    16
    Thanked 7 Times in 6 Posts

    Default Want to edit a php file from my php site

    I am maintaining a workstation inventory in my office and I store the name of the products in some variables and in an array.. I include the file in lot of pages to display the table header etc...

    Code:
    $office_2003 =  "Microsoft Office 2003" ;
    $office2007 = "Microsoft Office 2007" ;	
    $project = "Microsoft Project 2003" ;
    $project2007 = "Microsoft Project 2007" ;
    $sql2000 = "Microsoft SQL server 2000" ;	
    $sql2005 = " Microsoft SQL server 2005" ;
    $sql2008 = "Microsoft SQL server 2008" ;	
    $visio =  "Visio" ;
    $vb6 = "Visual Studio 6.0 Enterprise Ed" ;
    $dotnet2003 = "Visual Studio .NET 2003 Ent" ;
    $dotnet2005 = "Visual Studio .NET 2005 " ;
    $dotnet2008 = "Visual Studio .NET 2008 " ;
    $vss = " VSS" ;	
    $emb_vc = "Embedded VC++ " ; 
    $adobeflex = "Adobe Flex " ;	
    $delphi = "Delphi " ;
    
    
    
    
    
    
    $products =  array("office_2003","office2007","project", "project2007", "sql2000" ,"sql2005", "sql2008", "visio","vb6","dotnet2003", "dotnet2005",
    "dotnet2008", "vss", "emb_vc", "adobeflex", "delphi");
    If I want to add a new product, I obviously need to edit this page to add one more value in the array as well as one more variable and create one more field in the database..

    I want to create a friendly page so that anybody could add a product from the website itself instead of messing with the code..

    How can I do that?

  2. #2
    Join Date
    Apr 2009
    Location
    Cognac, France
    Posts
    400
    Thanks
    2
    Thanked 57 Times in 57 Posts

    Default

    Unless I'm misunderstanding what you want couldn't you just have a products table in your database and read this to create your header array.

  3. #3
    Join Date
    Feb 2009
    Posts
    73
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    yeap, use table on your database to fetch this dynamic data.
    fetch it and put it on your array()

  4. #4
    Join Date
    Mar 2009
    Location
    Chennai, India
    Posts
    77
    Thanks
    16
    Thanked 7 Times in 6 Posts

    Default

    I never thought about doing it this way... I will try that

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •