PHP: How to disable right click

Posted on 2007-07-31
Last Modified: 2009-07-29
I have a variable $norightclick from the database and i wanna do this:
if ($norightclick){
//disable right click for this page
Question by:jtcy
    LVL 75

    Accepted Solution

    <? if ($norightclick) echo "oncontextmenu='return false'"; ?>>


    PS: Right-click can always be circumvented by the way
    LVL 40

    Expert Comment

    LVL 75

    Expert Comment

    by:Michel Plungjan
    The last link from RQuadling points at this:

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now