Added Last Index Of Function and Integrated with HTML Form