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 read textarea line by line 
Php :: pagenavi plugin 
Php :: print select sql result in php 
Php :: php get docblock with reflection 
Php :: laravel route namespace and prefix 
Php :: find only selected columns 
Php :: laravel multiple status for a attribute in laravel migration 
Php :: how to verify envato purchase code in php 
Php :: php input seperated by space 
Php :: describe request php-salesforce-rest-api 
Php :: drupal 9 custom access checking for routes 
Php :: Comment ajouter nofollow à un lien spécifique ou à tous les liens WordPress dans the_content 
Php :: chart trong laravel 
Php :: white labeling wordpress divi 
Php :: php random number routing 
Php :: php add km to longitude 
Php :: laravel required_if fileld has value 
Php :: levenshtein (PHP 4 = 4.0.1, PHP 5, PHP 7, PHP 8) levenshtein — Calculate Levenshtein distance between two strings 
Php :: how to fix 419 page expired in laravel 
Php :: how to stop a query if query after it is not inserted in laravel 
Php :: use varable on all site pages laravel 
Php :: yii1 anchor tag 
Php :: use middleware in controller to have access session 
Php :: get categories only assigned to post Wordpress 
Php :: php email 
Php :: find largest element of an array in php 
Php :: how to push associative array in php 
Php :: last insert id in laravel 
Php :: psr/log is locked to version 2.0.0 and an update of this package was not requested. - psr/log 2.0.0 requires php =8.0.0 - your php version (7.4.26) does not satisfy that requirement. 
Php :: time dropdown in html 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =