[php] PHP: Show yes/no confirmation dialog

The PHP way of doing this would be using a dialog system inside php.for example GTKDialogs: http://www.kksou.com/php-gtk2/articles/setup-a-dialog-box---Part-2---simple-yes-no-dialog.php The javacript way is probably a bit easier, but remember when javascript is turned off, this does not work (except if you check javascript to be enabled and then add this!?) This could be with a onclick handler like tsvanharen posted, or with a simple text dialog inside the page instead of a nagging popup.

<a onClick="$('deletefromtable').show();"></a>
<div id="deletefromtable" style="display:none;">
 Do you really want to do this?<br/>
 <a href="deleteit.php">Yes</a>|<a onClick="$('deletefromtable').hide();">No</a>
</div>

I use prototype (hence the $() tag and the show()/hide()) for it. but you can easily change it to work without prototype:

<a onClick='document.getElementById("deletefromtable").style.display = "block";' href="#">click here to delete</a>
<div id="deletefromtable" style="display:none;">
 Do you really want to do this?<br/>
 <a href="deleteit.php">Yes</a>|<a onClick='document.getElementById("deletefromtable").style.display = "none";' href="#">No</a>
</div>

Again, this does not work without javascript, but almost no options do.

Examples related to php

I am receiving warning in Facebook Application using PHP SDK Pass PDO prepared statement to variables Parse error: syntax error, unexpected [ Preg_match backtrack error Removing "http://" from a string How do I hide the PHP explode delimiter from submitted form results? Problems with installation of Google App Engine SDK for php in OS X Laravel 4 with Sentry 2 add user to a group on Registration php & mysql query not echoing in html with tags? How do I show a message in the foreach loop?

Examples related to javascript

need to add a class to an element How to make a variable accessible outside a function? Hide Signs that Meteor.js was Used How to create a showdown.js markdown extension Please help me convert this script to a simple image slider Highlight Anchor Links when user manually scrolls? Summing radio input values How to execute an action before close metro app WinJS javascript, for loop defines a dynamic variable name Getting all files in directory with ajax

Examples related to mysql

Implement specialization in ER diagram How to post query parameters with Axios? PHP with MySQL 8.0+ error: The server requested authentication method unknown to the client Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver' phpMyAdmin - Error > Incorrect format parameter? Authentication plugin 'caching_sha2_password' is not supported How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Connection Java-MySql : Public Key Retrieval is not allowed How to grant all privileges to root user in MySQL 8.0 MySQL 8.0 - Client does not support authentication protocol requested by server; consider upgrading MySQL client