1. mysql °èÁ¤ °ü·Ã °íÄ¡±â * ¼÷Á¦ ¼­¹ö mysql ȯ°æ¿¡ ¸Â°Ô °èÁ¤À̸§, passwd µî ±³Ã¼ 1. POST ·Î °ª º¸³»±â ¾ÈµÇ´Â ¹®Á¦, ÄíÅ° ¾ÈµÇ´Â ¹®Á¦ * ¿øÀÎ * php.ini ÀÇ ¼³Á¤ÀÌ ´Ù¸§. * register_globals = off Àεí * /etc/php.ini Àº on * /usr/local/lib/php.ini Àº off * ÇØ°á * ¾Æ·¡¿Í °°ÀÌ check.php, index.php ¿¡ Ãß°¡( º¸°í¼­¿Í ´Þ¶óÁöÁö ¾Ê°Ô ÇÑÁÙ·Î Ãß°¡) {{{check.php ¿¡ Ãß°¡ $name = $_POST['name']; $address = $_POST['address']; $cardnumber = $_POST['cardnumber']; $phonenumber = $_POST['phonenumber']; $email = $_POST['email']; $quantity = $_POST['quantity']; $productInfo = $_POST['productInfo']; $indexNumber = $_COOKIE['indexNumber'];}}} {{{index.php ¿¡ Ãß°¡ $indexNumber = $_COOKIE['indexNumber'];}}} 1. DB Çʵå ÂüÁ¶ Á¦´ë·Î ¾ÈµÇ´Â ¹®Á¦ * ÀÌÀ¯ ºÒºÐ¸í * ´Ù¸¥ ¼­¹ö¿¡¼­´Â ÀßµÊ * ÇØ°á * ¾Æ·¡¿Í °°ÀÌ °íħ(³¡¿¡ ÁÖ¼®Ã³¸®µÈ °ÍÀº ¿ø·¡ ÄÚµå) {{{index.php $ss = $row['SUM(ProductNum)']; echo "$ss";//echo "$row[SUM(ProductNum)]"; $sss = $row['SUM(ProductNum*ProductUnitPrice)']; echo "$sss won"; //echo "$row[SUM(ProductNum*ProductUnitPrice)] won";}}} {{{admin.php $ss = $row['SUM(ProductNum)']; echo "$ss"; //echo "$row[SUM(ProductNum)]"; $sss = $row['SUM(ProductNum*ProductUnitPrice)']; echo "$sss won"; //echo "$row[SUM(ProductNum*ProductUnitPrice)] won";}}}