hooked up the php logic