Modified result.php

Modified result.php database insert logic.