ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

10-3-2 ¸ê®ÆÀx¦s»Pª¬ºAÅã¥Ü

10-3-2 ¸ê®ÆÀx¦s»Pª¬ºAÅã¥Ü

10-3-2   ¸ê®ÆÀx¦s»Pª¬ºAÅã¥Ü
Àx¦s³ø¦WªÌ¸ê®Æªºadd.phpµ{¦¡ºô­¶¨ä¥ô°È¦³¨â¶µ¡G±N¸ê®Æ¼g¤J¸ê®Æ®w¡AÅã¥Ü³ø¦Wª¬ºA»P°Ñ¥[ªÌ²M³æ¦Cªí³sµ²¡C

1¡B³ø¦WªÌ¦b³ø¦Wºô­¶in.php¤¤¶ñ¼g¦n¬ÛÃöªº¸ê®Æ¡A«hªí³æ¤¤ªº¸ê®Æ±N¥Ñ¥»µ{¦¡ºô­¶¨Ó¼g¤J¦Ü¸ê®Æ®w¤¤¡F½Ð¯S§Oª`·N¡yactname¡z³o­ÓÅܼƭȡA³o­ÓÅܼƬO¥Î¨Ó±µ¨ú³ø¦WªÌ©Ò­n°Ñ¥[ªº¬¡°Ê¶µ¥Ø¡]¤U©Ô¿ï³æªº¿ï¶µ­È¡^¡I§Ú­Ì§Q¥Î¦¹ÅܼƭȨӶ}±Ò¬Û¹ïÀ³ªº¸ê®Æ®w¸ê®Æªí¡A¦Ó¥B±N¦¹ÅܼƭȥΨӧ@¬°ºô­¶Åã¥Üªº¼ÐÃD¡F¦p¤U¹Ï©Ò¥Ü¡G

¹Ï10-19  ¡yactname¡zÅܼÆÀ³¥Î¡C

2¡B¬d¬Ý¤w°Ñ¥[¤H­ûªº³sµ²³]­p¬O±Ä¥Î¡uªí³æ¡v¤è¦¡«Ø¥ß¡AÁöµM³ø¦WªÌ©Ò¬Ý¨ìªººô­¶µe­±¥u¦³¡u¬d¬Ý¤w°Ñ¥[¤H­û¡v³o­Ó«ö¶s¡A¦ý¬O¡A·í³ø¦WªÌ«ö¤U¦¹¤@«ö¶s®É«o¦³¤@¶µÄæ¦ì¸ê®Æ³Q°e¥X¡A¤£¬O«ö¶sªº­È¡]Value¡^³á¡A¦Ó¬O§Ú­Ì©Ò«Ø¥ßªº¤@­ÓÁôÂÃÄæ¦ì¡Gactname¡I
  1. <form method="POST" action="list.php">
  2. <p align="center">
  3. <input type="hidden" value="<?=$actname?>" name="actname">
  4. <input type="submit" value="¬d¬Ý¤w°Ñ¥[¤H­û" style="background-color: #008000; color: #FFFFFF; border-style: groove">
  5. </p></form>
½Æ»s¥N½X
3¡B·í³ø¦WªÌ«ö¤U¡u¬d¬Ý¤w°Ñ¥[¤H­û¡v«ö¶s¡A«hªí³æ¤¤ªº¸ê®Æ¬O¥æ¥Ñlist.phpµ{¦¡ºô­¶¨Ó³B²z¡A¦]¦¹¦bFORM¼ÐÅÒ¤¤¥²¶·±NactionÄݩʳ]©w¬°list.php¡A¦P®É¡A¸ê®Æªº¶Ç°e¤è¦¡methodÄݩʳ]©w¬°POST¡C
1.png
¹Ï10-20  ªí³æ³]­p¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

add.php
  1. <?
  2. //±µ¦¬¸ê®Æ
  3. $name = $_REQUEST["name"];
  4. $email = $_REQUEST["email"];
  5. $actname = $_REQUEST["actname"];

  6. //³sµ²MySQL Server
  7.     $conn = mysql_connect("localhost", "root", "12345a");
  8. //¿ï¾Ü¸ê®Æ®w
  9.     mysql_select_db("Report", $conn);
  10. //«ü©w´£¨ú¸ê®Æªº®Õ¹ï¦r¤¸ªí
  11.     mysql_query("set character set big5");
  12. //«Ø¥ß¬d¸ß¦r¦ê¥Î¥H§PÂ_¬O§_¤w¸g³ø¦W¹L
  13. $SQL="Select ©m¦W From " .$actname . " Where ©m¦W='" . $name . "'";
  14. $RS=mysql_query($SQL);

  15. if (!mysql_fetch_array($RS))
  16. {
  17. //¦pªG¨S¦³³ø¦W¹L«h¼g¤J¸ê®Æ
  18. $sql = "Insert Into " .$actname . " (©m¦W, Email) Values ('";
  19. $sql = $sql . $name . "', '";
  20. $sql = $sql . $email . "')";
  21. mysql_query($sql);
  22. $msg="§A¤w¸g¶¶§Q§¹¦¨<font color=#FF3300>" .$actname. "</font>¬ã°Q·|³ø¦W";
  23. }
  24. else  //¤w³ø¦W¹L
  25. {
  26. $msg="§A¤w¸g³ø¦W¹L<font color=#FF3300>" .$actname. "</font>¬ã°Q·|";
  27. }
  28. ?>

  29. <html>
  30. <head>
  31. <meta http-equiv="Content-Type" content="text/html; charset=big5">
  32. <title>½u¤W³ø¦W</title>
  33. </head>
  34. <body>
  35. <p align="center"><img border="0" src="tit.gif" width="231" height="40"></p>
  36. <p align="center"><?=$msg?></p>
  37. <hr width="80%" color="#FF9900">
  38. <form method="POST" action="list.php">
  39. <p align="center">
  40. <input type="hidden" value="<?=$actname?>" name="actname">
  41. <input type="submit" value="¬d¬Ý¤w°Ñ¥[¤H­û" style="background-color: #008000; color: #FFFFFF; border-style: groove">
  42. </p></form>
  43. </body>
  44. </html>
½Æ»s¥N½X
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

¤p»x¤j§A¦n¡G

§Ú½m²ß¨ì³o¸Ì¥X²{¤F³o­Ó°ÝÃD¡A

¦p¤U¹Ï¡G



§Ú¦³Àˬd¸ê®Æ®w¸Ì¦³¥¿±`¼g¤J¿é¤Jªº¸ê®Æ¡C

¦ý¦bin.php¤¤«ö¤U³ø¦W½T»{«á¨ìadd.php¤¤¡A

·|¥X²{³o¨Ç°T®§¡C

·Q½Ð¤p»x¤j¬°§Ú¸Ñ´b¤@¤U¡C

ÁÂÁ¡C
Learn Learn Learn

TOP

¦^´_ 3# pix756


    §Ú¸Õ¥Î¤F,¦ý¨S§A©Ò»¡ªº°ÝÃD­C?!

TOP

¦^´_ 4# gucci

¯u¬O©Ç¤F¡A§Ú¦A­«·s½m²ß¤@¹M¡A

gucciÁÂÁ§A³á¡I
Learn Learn Learn

TOP

        ÀR«ä¦Û¦b : ¯¸¦b¥b¸ô¡A¤ñ¨«¨ì¥Ø¼Ð§ó¨¯­W¡C
ªð¦^¦Cªí ¤W¤@¥DÃD