<?php
if (isset($_POST["renk"])){ renk = $_POST["liste"]; echo $renk; } ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Başlıksız Belge</title> <style type="text/css"> <!-- body { background-color: <?php echo $renk;?>; } --> </style></head>
<body> <form id="form1" name="form1" method="post" action=""> <label>liste <select name="liste" id="liste"> <option value="Red">Kırmızı</option> <option value="Black">Siyah</option> <option value="Yellow">Sarı</option> <option value="Green">Yeşil</option> <option value="Purple">Mor</option> </select> </label> <label> <input type="submit" name="renk" id="renk" value="Gönder" /> </label> </form> </body> </html>
Bir yanıt bırakın Cevabı iptal et