php - how to dropdown menu select filter data query? -


<?php $sql = "select id id, etkinlik_adi,etkinlik_tarihi,adiniz,soyadiniz,eposta,firma,departman,telefon,faks,cep_telefon,secim1,secim2,tarih  etkinlikler  order id "; $result = mysql_query($sql); if (!$result) {     echo "could not run query ($sql) db: " . mysql_error();    exit; } if (mysql_num_rows($result) == 0) {     echo "no rows found, nothing print exiting";     exit; } while ($row = mysql_fetch_assoc($result)) { $id=$row['id']; $etkinlik_adi=$row["etkinlik_adi"]; $etkinlik_tarihi =$row["etkinlik_tarihi"]; $adiniz = $row["adiniz"]; $soyadiniz = $row["soyadiniz"]; $eposta = $row["eposta"]; $firma = $row["firma"]; $departman = $row["departman"]; $telefon = $row["telefon"]; $faks = $row["faks"]; $cep_telefon = $row["cep_telefon"]; $secim1 = $row["secim1"]; $secim2 = $row["secim2"]; $tarih = $row["tarih"]; ? } mysql_free_result($result);  ?> 

how select filter data query dropdownmenu results ? how filter data based on selected column query?(for example adiniz, soyadiniz, tarih ? )

if have select menu adiniz this

<select name='adniz'> <option value="$name1"><? php echo $name1;?></option> <option valus="$name2"><?php echo $name2;?></option> ... </select> 

the query should be

$sql = "select id id, etkinlik_adi,etkinlik_tarihi,adiniz,soyadiniz,eposta,firma,departman,telefon,faks,cep_telefon,secim1,secim2,tarih  etkinlikler  adiniz='".$_post['adiniz']."' order id "; 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -