That sets what is reported, not what I asked: have you set it to display errors? If this is a public web site then you must set it to log errors and read the log file, location can be obtained from phpinfo()

2. At the beginning of the code there is a link to other file that contains this line

Again, not what I asked; the code that you put in your post: is that for two files or is it just one?

if one file, what is it called, if it's two files what are they called?

3. i just did check the resultant html code. What should i be looking for?

Correctly formed html that is exactly what you thought it would be

4. I'm following tutorial..the teacher had same problem...but he resolved it by removing "required" attribute for the fields, which i never inserted on first place.

Find another tutorial, forget anything it did, if you paid for this, ask for your money back - I've heard it all now

If the first listing (you posted) is producing the second listing, you have serious problems.

Are you typing "localhost/insert_page.php" into the address bar of your browser?
and
is that the code from the first code you posted?
and
(finally) is that file in your web root directory (the same place as oops.php)

You are right it's not the same.Sorry for confusion.
1st listing insert_product.php listing, the 2nd listing is index.php file which is irrelevant in a problem i'm having.I provided it in attempt to your comment.

Have you checked the resultant html code (the one that is displayed in your browser)?

Can you post a screenshot of when you type the address in your browser to execute the script.

4.png (33.86 KiB) Viewed 2773 times

And can you also post a screenshot of the script in your editor (just what's on the screen will do; make sure that there isn't any sensitive information on the screen.