• r2_666266
    了解作者
  • 1.1KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-14 04:58
    上传日期
php对mysql数据库的增加,修改,编辑
lesson2.zip
  • lesson2
  • wishlist.php
    1.3KB
  • index.php
    457B
内容介绍
<html> <body> Wish List of <?php echo $_GET["user"]."<br/>";?> <?php $con = mysql_connect("localhost", "phpuser", "!phpuser"); if (!$con) { die('Could not connect: ' . mysql_error()); } //SET NAMES sets client, results, and connection character sets mysql_query("SET NAMES 'utf8'"); mysql_select_db("wishlist", $con); $wisher = mysql_query("SELECT ID FROM wishers WHERE name='".mysql_real_escape_string($_GET["user"])."'"); if (mysql_num_rows($wisher)<1) { die("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" ); } $wisherID = mysql_result($wisher, 0); ?> <table border="black"> <tr> <th>Item</th> <th>Due Date</th> </tr> <?php $result = mysql_query("SELECT * FROM wishes WHERE wisher_id=". $wisherID); while($row = mysql_fetch_array($result)) { $desc = $row["description"]; $dueDate = $row["due_date"]; echo "<tr><td>" . strip_tags($desc,'<br><p><h1>')."</td>"; echo "<td>". strip_tags($dueDate)."</td></tr>\n"; } mysql_close($con); ?> </table> </body> </html>
评论
    相关推荐