I have a link on the page that opens a contact form in a modal window.
How can I verify that the user clicked on the link to access the contact form, and did not go to the page directly. I don’t want users or bots inadvertently browsing to that page.
Thanks in advance!
You can check for
$_SERVER['X_HTTP_REQUESTED_WITH']header, which will bexmlhttprequestwhenever it’s an ajax request