PHP实现直接在页面上执行SQL语句
2018-07-20 来源:open-open
<?php if (isset($_POST['submit'])) { $rowID = $_POST['id']; mysql_connect("mysql153.secureserver.net","java2s","password"); mysql_select_db("java2s"); $query = "SELECT * FROM Employee WHERE ID='$id'"; $result = mysql_query($query); list($name,$productid,$price,$description) = mysql_fetch_row($result); } ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <select name="id"> <option name="">Choose a employee:</option> <option name="1">1</option> <option name="2">2</option> <option name="3">3</option> </select> <input type="submit" name="submit" value="Submit" /> </form>
标签: Mysql
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点!
本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。
最新资讯
热门推荐