complete support for dynamic number of brands

updates php to save and load a dynamic number