php - How to handle drop down list -


i trying make code work using drop-down list. possible strip_tags not work drop down list? if 1 can me helpful

html

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>untitled document</title> <script src="spryassets/spryvalidationselect.js" type="text/javascript">       </script> <link href="spryassets/spryvalidationselect.css" rel="stylesheet"     type="text/css" /> </head>  <body> <span id="spryselect1"> <label> <form method="post" action="b.php"> <select name="s" id="s">  <option value="friends" selected>friends</option>                             <option value="search">search engine</option>                             <option value="ad">advertisement</option>                             <option value="other">other</option> </select> <div class="col span-2-of-3">                         <input type="submit" value="send it!">                     </div>                     </form> </label> <span class="selectrequiredmsg">please select item.</span></span> <script type="text/javascript"> <!-- var spryselect1 = new spry.widget.validationselect("spryselect1"); //-->    </script>    </body> 

php

<?php   include_once('connection.php'); $s=strip_tags($_post['s']);  if (@$_post['submit']) { $queryreg = mysql_query("                      insert p values ('$s')                      ");    }  else   echo "not done";  ?> 


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -