Hey all,
Working on a new website for my Mum's shop (http://designsonpine.co.uk). Re-coding the way some of it works, especially the page layouts. The website is PHP + MySQL driven.
As you can see in the attached image there is a row of images and then the product info.
The way my old code worked was take everything out of the database and store it in arrays i.e:
Itemcode[a]
Image_ID[a]
etc
Then I'd loop through it and populate the first <tr> with the images and work my way down with item codes etc. Doing it this way I ended up with loads of whiles and ifs.
This seems a very clumber some way to do it and was wandering whether anyone had any other suggestions that I'm just not seeing.
As I'm making some major changes just wanted to see if anyone had any suggestions before I started getting my head around my current mess
Keiran
Working on a new website for my Mum's shop (http://designsonpine.co.uk). Re-coding the way some of it works, especially the page layouts. The website is PHP + MySQL driven.
As you can see in the attached image there is a row of images and then the product info.
The way my old code worked was take everything out of the database and store it in arrays i.e:
Itemcode[a]
Image_ID[a]
etc
Then I'd loop through it and populate the first <tr> with the images and work my way down with item codes etc. Doing it this way I ended up with loads of whiles and ifs.
This seems a very clumber some way to do it and was wandering whether anyone had any other suggestions that I'm just not seeing.
As I'm making some major changes just wanted to see if anyone had any suggestions before I started getting my head around my current mess
Keiran