I was referring to the structure of your code more than anything.
Also, I’m not psychic, so without you explicitly saying WHY you were using the mysql_ functions, how am I supposed to know?
It’s more about the structure of your code that bothers me though. Why no oop? Why not use models to access your data? Why are you outputting html from within your php?
On a larger scale, this code would be virtually impossible to maintain.
Anyway, I can’t be bothered discussing stuff like this with someone with a negative attitude to improvement.