Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php listen to select event

<html>
<head>
</head>
<body>
    <?php
        function OnSelectionChange() {
            echo("OK IT WORKS");
        }    
    ?>
<section>
    <select onchange="OnSelectionChange()">
        <option value='' disabled selected>Assign Driver</option>
        <option value='4353'>Steve Jobs</option>
        <option value='3333'>Ian Wright</option>
        <option value='66666'>Mark James</option>
    </select>
</section>    
      
 // NEW LINE     
  <form method="POST" action="">
      Select Your Country 
      <select name="country" onchange="this.form.submit()">
          <option value="" disabled selected>--select--</option>
          <option value="india">India</option>
          <option value="us">Us</option>
          <option value="europe">Europe</option>
      </select>
  </form>
<?php
   if(isset($_POST["country"])){
       $country=$_POST["country"];
       echo "select country is => ".$country;
   }
?>
</body>
</html>
Comment

PREVIOUS NEXT
Code Example
Php :: check value is email or mobilenumber using php 
Php :: php eval base64_decode 
Php :: PHP how to skip file upload if file already exist 
Php :: prevent cross site scripting php 
Php :: df/mpdf/src/Cache.php on line 21 
Php :: shopware php get cookie 
Php :: afiseaza id-ul sesiunii php 
Php :: remove the public from url in laravel 
Php :: beanstalk run laravel command 
Php :: curl upload image huawei 
Php :: numeros positivos input laravel 
Php :: how to validate multi image upload in laravel 
Php :: cakephp 3 migrations foreign key 
Php :: PHP Superglobal - $_POST 
Php :: image upload in cake 2 
Php :: chr (PHP 4, PHP 5, PHP 7, PHP 8) chr — Generate a single-byte string from a number 
Php :: undefined function bcmul php linux 
Php :: int to string in php 
Php :: php artisan spark not working in codeigniter 
Php :: Laravel Http client retry request if fail 
Php :: levenshtein (PHP 4 = 4.0.1, PHP 5, PHP 7, PHP 8) levenshtein — Calculate Levenshtein distance between two strings 
Php :: yii2 gridview get selected rows 
Php :: php print array as string 
Php :: how to store api response to avariable in phpp 
Php :: Comment désactiver la barre latérale Widgets sur des pages spécifiques WordPress 
Php :: php mysql foreach is bad pardics ? 
Php :: Insert Data Into MySql Database Multiple Columns PHP Function 
Php :: undefined variable inside function php 
Php :: woocommerce check if shop page 
Php :: install phpmyadmin debian 11 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =