change background color with user option
<form action="" method="post">
<select name="Color">
<option value="White">White</option>
<option value="Red">Red</option>
<option value="Green">Green</option>
<option value="Blue">Blue</option>
<option value="Pink">Pink</option>
<option value="Yellow">Yellow</option>
</select>
<input type="submit" name="submit" value="Get Selected Values" />
</form>
<?php
if(isset($_POST['submit'])){
$selected_val = $_POST['Color']; // Storing Selected Value In Variable
echo "<style>body{background-color:".$selected_val.";}</style>"; // Displaying Selected Value
}
?>
Also in PHP:
- array reverse in php example
- ci db query error
- 500 internal error laravel
- change max_execution_time php on script
- clear all laravel caches
- cahe laravel
- array unique in php using a column
- add d4 days in php\
- base64_encode decode php
- count duplicate in array and delete using php
- creating web application with php and sparql on backend
- calcolo iva php
- collection get first element laravel
- blog post page is_home
- create symfony project
- buttons in php
- date method php
- codeigniter where order by
- body field yml drupal config
- artisan run seeder
- How to make a laravel project working
- convert timestamp to datetime php
- check that array key exists
- call php function in js