HTML + PHP + jQuery. HTML_form->jQuery_DialogConfirmYesOrNo->PHP_GetValue

I have HTML+PHP+jQuery+MySQl projects. Should I remove a record from the dbase and I require confirmation. The code is shown below. \[code\]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it"><head> <meta charset="utf-8" /> <title>jQuery UI Dialog - Modal confirmation</title> <link rel="stylesheet" href="http://stackoverflow.com/questions/14604062/js/jquery-ui-1.10.0/themes/base/jquery-ui.css" /> <script type="text/javascript" src="http://stackoverflow.com/questions/14604062/js/jquery-1.9.0.min.js" charset="utf-8"></script> <script type="text/javascript" src="http://stackoverflow.com/questions/14604062/js/jquery-ui-1.10.0/ui/jquery-ui.js" charset="utf-8"></script> <script type="text/javascript">$(document).ready(function () { $( "#dlgConfirm" ).dialog({ modal: true, bgiframe: true, autoOpen: false, closeOnEscape: false, draggable: false, resizable: false, width: 300, height: 200, 'buttons': { 'Yes': function() { console.log("YES"); $(this).dialog( "close" ); return true; }, 'No': function() { console.log("NO"); $(this).dialog( "close" ); return false; } } }); $( "#butDelete" ).click(function() { $( "#dlgConfirm" ).dialog( "open" ); });});</script></head><body><?php//form if( $_SERVER['REQUEST_METHOD'] == 'POST' ) { if( $_POST['butDelete'] == 'Delete') ) echo "MYSQL delere record"; }?> <div id="dlgConfirm" title="Delete"> <p><span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>OK ?</p> </div> <form action="#" method="post" name="formTest" id="formTest"> <input id="butDelete" name="butDelete" type="submit" value="http://stackoverflow.com/questions/14604062/Delete" /> </form> </body></html>\[/code\]Question:[*]Why not wait for an answer?[*]From php as you take the answer ?thx
 
Back
Top