I want to somehow check the name of HTML file which has a submit button which goes to 'updatecart.php', in this php file I wanted to do an IF statement such as:
updatecart.php - Pseudo code:
IF(calling HTML file == "book1.html"){
// INSERT BOOK1 DATA INTO DATABASE TABLE (SQL)
}
IF(calling HTML file == "book2.html"){
// INSERT BOOK2 DATA INTO DATABASE TABLE (SQL)
}
etc...
I basically have multiple HTML files which all have a form with action set to action = "updatecart.php"
and I want to insert different data into the same database table depending on which page the form was submitted.
So I need to find the name of the HTML page from which the form was submitted.