NiTrino Posted April 20, 2008 Report Share Posted April 20, 2008 (edited) ja es pareizi sapratu, tev vajag lai izlec apstiprinājums, un jā apstiprināts, nosubmitot formu un izpildīt darbību? <form action="" method="post" id="forma"> <input type="hidden" name="is_submit" value="1" /> <a href="java script:void(0);" onclick="if (confirm('Izpildīt?')) document.getElementById('forma').submit()" >[x]</a> </form> <?php if ($_POST['is_submit']) { //forma ir nosubmitota mysql_query("sql"); } ?> es tikai nesaprotu kapēc tev tieši formu ar post metodi, daudz vienkāršak to var darīt caur _GET Edited April 20, 2008 by NiTrino Link to comment Share on other sites More sharing options...
anonīms Posted April 20, 2008 Author Report Share Posted April 20, 2008 NiTrino, es arī veidoju ar $_GET. Link to comment Share on other sites More sharing options...
NiTrino Posted April 20, 2008 Report Share Posted April 20, 2008 aa nu tad <a href="java script:void(0);" onclick="if (confirm('Izpildīt?')) document.location.href='?izpildit=true'" >[x]</a> <?php if ($_GET['izpildit']) { //daram ko vajag } ?> Link to comment Share on other sites More sharing options...
Recommended Posts