Hi,
sorry for the over excitement
It was indeed an error with the way I was inputting the data into mysql.
My method was SET name=$name etc when I changed to INSERT INTO table (etc,etc) VALUES ($etc, $etc) It worked first time!
There is only one more problem I am having
I wanted a prefix to go onto each line of the generated code eg:
pref+423243+suf
[ $codes .= $codigo."+".$i."#<br>"; ]
[ $codes .= "pref".$codigo."+".$i."#<br>"; ] <---Doesnt work?
I have managed to get the suffix but when I use the same method for prefix it spits out the wrong code

Any tips you got there the_mole?
p.s. THANKYOU ever so much for your help, you truely are a lifesaver
