borris83
04-15-2009, 03:15 PM
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...
$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?
$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?