php recode

Php coding changed to include prepared sql statements