Solved it!
Just add some session checking and the code will no longer be run everytime the page load/refreshed!
- Code: Select all
If Session("saved") <> "saved" Then 'If session value is not equal the value "saved", this code will not be executed!
open the database connection, saved the user IP address and
set session("saved") = "saved"
End If