Search
 
SCRIPT & CODE EXAMPLE
 

PHP

get data from select option php

// Page containing a form:
<form action="myaction.php" method="post">
 <select name="fruit">
    <option value="Apple">Apple</option>
    <option value="Banana">Banana</option>
 </select>  
 <input type="submit" value="Submit">
</form>

// myaction.php
Hello <?php echo htmlspecialchars($_POST['fruit']); ?>
Comment

get HTML select value to PHP

$selectOption = $_POST['taskOption'];
Comment

PREVIOUS NEXT
Code Example
Php :: how to define function in php 
Php :: php pdo database connection 
Php :: str_contains 
Php :: laravel file permissions 
Php :: laravel image validate 
Php :: php remove leading zeros 
Php :: iterating rows in php 
Php :: php typecast to int 
Php :: how to get data from a table in laravel 
Php :: laravel delete 
Php :: if i am using $_SERVER it shows 500 error 
Php :: destroy all sessions in laravel 
Php :: validate laravel 
Php :: laravel auth user in constructor 
Php :: search function using php for database entries 
Php :: paginate relationship laravel7 
Php :: remove seconds from time php 
Php :: foreach in php 
Php :: or where laravel 
Php :: wp_get_attachment alt text 
Php :: rule In in laravel 
Php :: php variable in string 
Php :: How to check if email exists in laravel validaton 
Php :: delete multiple row by model in laravel 
Php :: laravel chunk select 
Php :: magento2 set session timeout cia cli 
Php :: laravel mass update 
Php :: get class name from object php 
Php :: laravel create or update eloquesnt 
Php :: boot add schema in laravel 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =