0
 33   4   1
  View Articles

Name  
   ¼Õº´¸ñ  (2002-12-19 14:08:50, Hit : 17689, Vote : 2431)
Homepage  
   http://www.itmembers.net
Subject  
   [Çؼ³] °Ô½ÃÆÇ ±Û ³»¿ë ¼öÁ¤ ±â´É(2) modify_ok.php ¼Ò½º
ÀÌ ºÎºÐ ¿ª½Ã ¾Õ¼­ insert.php¿Í Å©°Ô ´Ù¸£Áö ¾Ê¾Æ Äڵ带 ÀÌÇØÇϱ⠱׸® ¾î·ÆÁö ¾ÊÀ» °ÍÀÔ´Ï´Ù.
´ÜÁö ´Ù¸¥ Á¡À̶ó°í´Â SQL Äõ¸®¹®ÀÌ, insert.php¿¡¼­ INSERT¹®À» ¾´µ¥ ¹ÝÇØ ¿©±â¼­´Â UPDATE¹®À» »ç¿ëÇÑ´Ù´Â °ÍÀÔ´Ï´Ù. ±ÛÀ» »õ·Î ÀÔ·ÂÇÏ´Â °Í°ú ¼öÁ¤ÇÏ´Â °ÍÀÌ´Ï, ´ç¿¬ÇÑ ¸»ÀÌ°ÚÁÒ....

¾Æ·¡ Äڵ忡¼­ SQL Äõ¸®¹®ÀÇ ¶æ¸¸ ÀÌÇØÇÏ¸é µË´Ï´Ù.

  1. $sql = "select number from $tablename where number=$number and password='$password'";
  2. $result = mysql_query($sql) or die (mysql_error());
  3.   
  4. if(mysql_num_rows($result)) {  //¹ÝȯµÈ ¿­ÀÌ ÀÖÀ¸¸é...
  5.         //¼öÁ¤ÇÑ ³»¿ëÀ» UPDATEÇÕ´Ï´Ù.
  6.         $sql = "update $tablename set
  7.                         name='$name',email='$email',homepage='$homepage',
  8.                         subject='$subject',memo='$memo' where number=$number";

    ¸ÕÀú 20Çà¿¡¼­ ÇöÀç ±Û¹øÈ£¿Í Æнº¿öµå¸¦ ºñ±³ÇÏ¿© DB¿¡ ÀúÀåµÈ ÇØ´ç ±Û¹øÈ£ÀÇ Æнº¿öµå¿Í ÀÏÄ¡ÇÏ´ÂÁö ¾Ë¾Æº¸±â À§ÇÑ Äõ¸®¹®À» Á¤ÀÇÇÕ´Ï´Ù.
    21Çà¿¡¼­ Äõ¸®¹®À» ½ÇÇàÇÕ´Ï´Ù.
    23ÇàÀº, Äõ¸®ÀÇ °á°ú°¡ ÀÖÀ¸¸é 24ÇàºÎÅÍ ½ÇÇàÇ϶ó´Â ÀǹÌÀÔ´Ï´Ù. ¾ø´Ù¸é? ºñ¹Ð¹øÈ£°¡ Ʋ¸®´Ù°í ¸Þ½ÃÁö¸¦ º¸ÀÌ°í Àü È­¸éÀ¸·Î À̵¿ÇÏ°Ô µÇ´Â °ÅÁÒ. (ÄÚµå 44ÇàºÎÅÍÀÔ´Ï´Ù.)

    25~27ÇàÀÇ Äõ¸®¹®Àº modify.php¿¡¼­ ³Ñ¾î¿Â °ªµéÀ» DB¿¡ ¿ø·¡ ÀúÀåµÈ ³»¿ë¿¡ µ¤¾î¾²´Â ±â´ÉÀ» ÇÕ´Ï´Ù.

    ³ª¸ÓÁö ÀÌÇØ°¡ ¾ÈµÇ´Â ºÎºÐÀÌ ÀÖÀ¸¸é insert.php Äڵ带 Çؼ³ÇØ ³õÀº °­Á¸¦ º¸½Ã¸é µË´Ï´Ù.


ÀÌ»ó, 21¼¼±â ù ´ëÅë·É »Ì´Â³¯, µ¿ÁÖ°¡ Àáµç Æ´À» Ÿ ¸ð·¡ ±ÛÀ» ¾²´Â Àú´Â,
µ¿Á־ƺü ¼Õº´¸ñÀÔ´Ï´Ù.

Prev
   °Ô½ÃÆÇ ±Û ³»¿ë »èÁ¦ ±â´É(1) delete.php ¼Ò½º [1]

¼Õº´¸ñ
Next
   °Ô½ÃÆÇ ±Û ³»¿ë ¼öÁ¤ ±â´É(1) modify.php ¼Ò½º

¼Õº´¸ñ


no
subject
name
date
hit
*
Copyright 1999-2024 Zeroboard / skin by Zetyx