If I were you and I wanted to password protect a delete function, I would
store the username and password in a couple of tables in an MySQL database
Create a table named "id_table" with two fields:
field name "id" as primary
field name "user"
In the user field store the username and
in the id field store a unique id.
Create a table named "pass_table with two fields:
field name "id" as primary
field name "pass"
In the id field store the same unique id as in the id_table
and in the pass field store the password.
and do something like this:
Page_a.php
And on page_b.php I would do something like this:
And code.php: Note, it would be more secure if you stored this value in your database.