Search
 
SCRIPT & CODE EXAMPLE
 

PHP

multiple submit button in php

<?php
    if (isset($_POST['publish'])) {
        # Publish-button was clicked
    }
    elseif (isset($_POST['save'])) {
        # Save-button was clicked
    }
?>
Comment

multiple submit button form to multiple php files

<script type="text/javascript">
  function submitForm(action) {
    var form = document.getElementById('form1');
    form.action = action;
    form.submit();
  }
</script>

...

<form id="form1">
  <!-- ... -->
  <input type="button" onclick="submitForm('page1.php')" value="submit 1" />
  <input type="button" onclick="submitForm('page2.php')" value="submit 2" />
</form>
Comment

PREVIOUS NEXT
Code Example
Php :: php.hello 
Php :: php order filename 
Php :: factory laravel laravel 8 tinker 
Php :: throttle laravel 
Php :: php regular expression function 
Php :: mobile detect in laravel 
Php :: pdf to image php 
Php :: laravel run all seeders 
Php :: kartik select 2 yii2 
Php :: distinct laravel not working 
Php :: autoload file in laravel 
Php :: php get bool from string 
Php :: php mail in localhost wamp 
Php :: php unique assoc array by value 
Php :: search laravel 
Php :: remove colon and white space in a string by php 
Php :: laravel eloquent multiple join with where conditions 
Php :: get all class methods php 
Php :: @lang laravel blade 
Php :: run codeigniter 4 with spark 
Php :: file put contents php 
Php :: return only one column data from table in codeigniter 
Php :: eager load relationships by default in the model laravel 
Php :: laravel post ajax proper csrf 
Php :: laravel auth 
Php :: laravel chunk 
Php :: how to check path laravel 
Php :: php get property with ~ 
Php :: mysql Cannot pass parameter 2 by reference 
Php :: filter wordpress 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =