Okay, but still not working... is NULL the same as ' '? Or does NULL have to be the inserted value in the db? J Chris <dmagick@xxxxxxxxx> wrote: JeRRy wrote: > Hi, > > Okay I played with the code a bit and ended up with this, it does NOT > produce errors but it's not doing anything. Connects to the db but does > not do the mail out. Maybe I missed something said before, but here you > go, the link below with the code. (it's probably basic) Actually try this one: http://pastebin.com/650871 You had an extra loop just for 'tippings' but never used it anywhere. -- Postgresql & php tutorials http://www.designmagick.com/