PHP: How to disable right click

Posted on 2007-07-31
Medium Priority
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
  • 2
LVL 75

Accepted Solution

Michel Plungjan earned 2000 total points
ID: 19599226
<? if ($norightclick) echo "oncontextmenu='return false'"; ?>>


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

Expert Comment

by:Michel Plungjan
ID: 19599438
The last link from RQuadling points at this: http://www.webreference.com/dhtml/diner/contextmenu/5.html

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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 …
Suggested Courses
Course of the Month13 days, 16 hours left to enroll

807 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