¾È³çÇϼ¼¿ä. CGI¸¦ óÀ½ Á¢ÇÏ´Â Ãʺ¸ÀÔ´Ï´Ù. ¿À¶óŬDB¿¡ µ¥ÀÌŸ¸¦ ÀÔ·ÂÇÏ·Á°í Çϴµ¥ Á¦´ë·Î µÇÁö°¡ ¾Ê´Â±º¿ä. ¾Æ·¡ ¼Ò½º¸¦ º¸½Ã°í Á» ±ÞÇÕ´Ï´Ù. °í¼ö´Ôµé ´äº¯ÁÖ½Ã¸é °¨»çÇÏ°Ú½À´Ï´Ù. #!/usr/local/bin/perl #ȯ°æº¯¼ö°ªÀ» ¼³Á¤ÇÑ´Ù. nobody·Î Á¢±ÙÇÏ´Â »ç¿ëÀڵ鿡°Ô ²À ÇÊ¿äÇÑ º¯¼öÀÌ´Ù. $ENV{ ORACLE_HOME } = "/oracle/app/oracle/product/7.3.4"; $ENV{ NLS_LANG } = "American_America.KO16KSC5601"; require "cgi-lib.pl"; require "teria-lib.pl"; &ReadParse; $memnum = $in{ memnum }; $insSQL = "insert into ROLLBOOK_TBL (nhanja,nhangu,curjob,curoll,prejob,prroll,birthd,birthp,memadd,memtel,offtel,cacade,carrel,memcert,membook) values(".$nhanja,$nhangu,$curjob,$curoll,$prejob,$prroll,$birthd,$birthp,$memadd,$memtel,$offtel,$cacade,$carrel,$memcert,$membook .")"; #DBI ¸¦ »ç¿ëÇÏ¿© DB Connection À» ÇÑ´Ù. use DBI; use CGI; $new=new CGI; $drh = DBI->install_driver( Oracle ); die unless $drh; $dbh = $drh->connect( DB , user , passwd ); die unless $dbh; $dbh->{LongReadLen} = 16384; $nhanja=$new->param( nhanja ); $nhangu=$new->param( nhangu ); $curjob=$new->param( curjob ); $curoll=$new->param( curoll ); $prejob=$new->param( prejob ); $prroll=$new->param( prroll ); $birthd=$new->param( birthd ); $birthp=$new->param( birthp ); $memadd=$new->param( memadd ); $memtel=$new->param( memtel ); $offtel=$new->param( offtel ); $cacade=$new->param( cacade ); $carrel=$new->param( carrel ); $memcert=$new->param( memcert ); $membook=$new->param( membook ); #Form actionÀÌ ÀϾÀ»°æ¿ì $actInput = $in{ actInput }; if($actInput eq "submit"){ $insSQL = "insert into table (nhanja,nhangu,curjob,curoll,prejob,prroll,birthd,birthp,memadd,memtel,offtel,cacade,carrel,memcert,membook) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; $cursor = $dbh->prepare($insSQL); $cursor->execute($nhanja,$nhangu,$curjob,$curoll,$prejob,$prroll,$birthd,$birthp,$memadd,$memtel,$offtel,$cacade,$carrel,$memcert,$membook); $memnum=$cursor->fetchrow_array; $cursor->fetch; $memnum ; $dbh->disconnect; }
|