This code will work like ajax and can be used to send request to php file