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

13-3-2 ¸Õ³õ¤jªù

13-3-2 ¸Õ³õ¤jªù

13-3-2   ¸Õ³õ¤jªù
§Ú­Ì­nÅý¾Ç¥Í©óºô¸ô½u¤W¶i¦æ¾Ç²ß¦¨ªG´úÅç¡A­º¥ý­n§@ªº¨Æ´N¬O¥ý½T»{«e¨Ó°Ñ¥[´úÅç¦Ò¸Õªº¾Ç¥Í¨­¤À¡A©Ò¥H§Ú­Ì¥²¶·¥ý³]­p¤@­Ó¥i¥HÅçÃҾǥͨ­¤Àªº¡y½u¤W¦Ò¸Õ¡Ð¸Õ³õ¤jªù¡zºô­¶¡A½T»{­n°Ñ¥[´úÅ窺¾Ç¥Í¬O§_¦b§Ú­Ìªº¨ü´ú¦W³æ¤¤¡A³o­Óºô­¶¤¤§t¦³¤@­Ó¨­¤À½T»{ªººô­¶ªí³æÅý¨ü´ú¾Ç¥Í¶ñ¼g©m¦W»P¾Ç¸¹¡A¨Ã¥B§t¦³¤@¤äPHPµ{¦¡»P¥t¤@¤äÀˬdªí³æÄæ¦ì¨ü§_¦³¶ñ¼g¸ê®ÆªºVB Script µ{¦¡¡A¨ü´ú¾Ç¥Í«ö¤Uªí³æ¤¤ªº¡y¶i¤J¦Ò³õ¡z«ö¶s«á¡A±N·|¥ý±Ò°ÊVB Script µ{¦¡ÀËÅç¬O§_¯Ê¶ñ¬ÛÃöªº¸ê®Æ¡A±µµÛ³o¨Ç¸ê®Æ±N·|³Q°e¦ÜPHPµ{¦¡¤¤¡APHPµ{¦¡±N·|Ū¨ú¸ê®Æ®w¤¤ªº¨ü´ú¾Ç¥Í¦W³æ¸ê®Æ»P¦Ûºô­¶ªí³æ±µ¦¬¨ìªº¾Ç¥Í¸ê®Æ¤ñ¹ï¥H½T»{«e¨Ó¨ü´ú¾Ç¥Íªº¸ê®æ¡A¦pªG½T»{¨ü´ú¾Ç¥Íªº¨­¤ÀµL»~«á´N·|¶i¤J¡y½u¤W¦Ò¸Õ¡Ð¸Õ¨÷ºô­¶¡z¡C

²{¦b§Ú­Ì´N¨Ó»s§@³o­Ó§t¦³¿é¤J¸ê®ÆÀˬd¡B¨­¤ÀÅçÃÒÀˬdªº¸Õ³õ¤jªùºô­¶¡yindoor.php¡z¡G

¹Ï13-13 indoor.php¡C

½s¸¹Äæ¦ìÄæ¦ì¦WºÙªí³æ¤¸¥ó
¢Ï©m¦Wstudentname³æ¦æ¤å¦r¿é¤J¤è¶ô
¢Ð¾Ç¸¹number³æ¦æ¤å¦r¿é¤J¤è¶ô

±N«ö¤Uªí³æ¤¤ªº¡y¶i¤J¦Ò³õ¡z«ö¶s<input type="button" value="¶i¤J¦Ò³õ">«á¡A±N·|¥ý±Ò°ÊVB Script µ{¦¡¤¤ªºÀËÅç¨ç¼Æ¡ydatacheck¡zÀËÅç¬O§_¯Ê¶ñ¬ÛÃöªº¸ê®Æ¡AµM«áIJµoºô­¶¤¤ªºPHPµ{¦¡¶i¦æ¨­¤ÀÅçÃÒ¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

Àˬd¸ê®ÆÄæ¦ì¬O§_¶ñ¼g¸ê®ÆªºVB script µ{¦¡¡G
  1. <script language="vbscript">
  2. <!--
  3. <!-- Àˬd¦³¨S¦³¿é¤J¸ê®Æ -->
  4. Function datacheck

  5. <!--§Q¥ÎVB ÀËÅç¦r¦êªø«×ªºLen¨ç¼ÆÅçÃÒÄæ¦ì¸ê®Æ¬O§_¶ñ¼g-->
  6. IF Len(document.indoor.studentname.value)=0 or
  7. Len(document.indoor.number.value)=0 then
  8. <!--¦pªG¦³Äæ¦ì¨S¦³¶ñ¼g«h¨q¥Xĵ§iµøµ¡-->
  9. msg="½Ð¿é¤J¸ê®Æ¡I"
  10. MsgBox msg,vbExclamation,"¿ù»~!"
  11. Exit Function
  12. End IF
  13. <!--¦pªGÄæ¦ì¸ê®Æ³£¦³¶ñ¼g«hIJµo¨­¤ÀÅçÃÒªºPHPµ{¦¡-->
  14. indoor.Submit
  15. End Function
  16. -->
  17. </script>
½Æ»s¥N½X
¦b³o­ÓÀËÅç¸ê®ÆÄæ¦ì¬O§_¦³¶ñ¼g¸ê®ÆªºVB Scriptµ{¦¡¤¤¡A§Ú­Ì§Q¥ÎVB ÀËÅç¦r¦êªø«×ªºLen¨ç¼ÆÅçÃÒÄæ¦ì¸ê®Æ¬O§_¶ñ¼g¡A¦pªG¦³¥ô¤@­ÓÄæ¦ì¨S¦³¶ñ¼g¸ê®Æ±N·|¥X²{¤U¹ÏªºÄµ§iµøµ¡¡G

¹Ï13-14  ¥²¶·¶ñ¤J¨ü´úªÌ¸ê®Æ¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

¨­¤ÀÅçÃÒ
ÁöµM»¡§Ú­Ì¦b¸ê®ÆÄæ¦ì¤¤¶ñ¼g¤F©m¦W»P¾Ç¸¹¸ê®Æ¡A¦ý¬Oµ{¦¡ÁÙ¬O·|¦A®Ö¹ï¤@¦¸¨­¤ÀËç¡I¦pªG«e¨Ó¨ü´ú¾Ç¥Í¨Ã¨S¦³¦b¸ê®Æ®wªº¨ü´ú¾Ç¥Í¦W³æ¸ê®Æ¤¤¡A¨º»ò´N·|¥X²{´£¥Ü°T®§¡A´£¿ô«e¨Óªº¨ü´úªº¾Ç¥Í¬O§_¦³»~¶ñ¸ê®Æ¡A¨Ã­n¨D­«·s¶ñ¼g¸ê®Æ¡C

¹Ï13-15  ¬dµL¨ü´úªÌ¸ê®Æ¡C
  1. //¦pªGIndoorªí³æ¶Ç¨Óªº¾Ç¸¹¡B©m¦W¸ê®Æ¤£¬OªÅ¥Õªº
  2. //´N¶i¦æ»P¸ê®Æ®w¤¤¨ü´ú¾Ç¥Í¸ê®Æ¶i¦æ¤ñ¹ï
  3. IF (($studentname!="") && ($number!="")):
  4. //³sµ²MySQL Server
  5.     $conn = mysql_connect("localhost", "root", "12345a");
  6. //¿ï¾Ü¸ê®Æ®w
  7.     mysql_select_db("exam", $conn);
  8. //«ü©w´£¨ú¸ê®Æªº®Õ¹ï¦r¤¸ªí
  9.     mysql_query("set character set big5");
  10. //´£¨ú¸ê®ÆªºSQL©R¥O¦r¦ê
  11.    $SQL="SELECT * From student where ¾Ç¸¹='" .$number . "' and ©m¦W='" .$studentname . "'";
  12. //¶i¦æ¸ê®Æ¬d¸ß
  13. $RS=mysql_query($SQL);
  14. //¦pªG©m¦W¾Ç¸¹ÅçÃÒµL»~´N¶i¤J¸Õ¨÷ºô­¶
  15.    if ($Result=mysql_fetch_array($RS))
  16. {
  17. header("Location: question.php?" . $_SERVER["QUERY_STRING"]);
  18. }
  19. else
  20. {   
  21. //¦pªG§ä¤£¨ì¹ïÀ³ªº¾Ç¸¹»P©m¦W´NÅã¥Ü¿ù»~°T®§
  22.    IF ($Msg=="")
  23.    $Msg="©m¦W©Î¾Ç¸¹¿é¤J¦³¿ù»~¡I";
  24. }
  25. EndIf;
½Æ»s¥N½X
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

½Ð°Ý¡G
1.Àˬd¸ê®ÆÄæ¦ì¬O§_¶ñ¼g¸ê®Æ,­Y¬O¥ÎJavaScript»yªk­n¦p¦ó¼g?
2.vbscript¦³¨S¦³­­¨î¨Ï¥Î¨º¤@ºØÂsÄý¾¹?

TOP

¦^´_ 2# ¤p»x

©êºp!°Ý­ÓÄø°ÝÃD¡Aindoor.Submit³o­Ó»yªk¦ó·N¡H

TOP

¦^´_  ¤p»x

©êºp!°Ý­ÓÄø°ÝÃD¡Aindoor.Submit³o­Ó»yªk¦ó·N¡H
kingvincent µoªí©ó 2015-10-22 20:55

¦WºÙ¬°Indoorªºªí³æ°e¥Xªí³æ¤º­ÓÄæ¦ìªº¸ê®Æ
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

¦^´_ 6# ¤p»x

¦¬¨ì¡A·PÁ±zªº¦^ÂÐ!!

TOP

        ÀR«ä¦Û¦b : ±o²z­nÄǤH¡A²zª½­n®ð©M¡C
ªð¦^¦Cªí ¤W¤@¥DÃD