initial php code (incomplete)