여분필드 wr_76 이상일 때 입력이 안되는 이유가 뭔가요?
본문
write.php 와 write_update.php 파일을 확실하게 수정을 하였지만...
DB 에 입력이 안되는군요.
write.php 파일중 수정 부위...
if (!($w == '' || $w == 'u' || $w == 'r')) {
alert('w 값이 제대로 넘어오지 않았습니다.');
}
if ($w == 'u' || $w == 'r') {
if ($write['wr_id']) {
// 가변 변수로 $wr_1 .. $wr_10 까지 만든다.
for ($i=1; $i<=100; $i++) {
$vvar = "wr_".$i;
$$vvar = $write['wr_'.$i];
}
} else {
alert("글이 존재하지 않습니다.\\n삭제되었거나 이동된 경우입니다.", G5_URL);
}
}
write_update.php 파일중 수정 부위...(두곳)
$sql = " insert into $write_table
set wr_num = '$wr_num',
wr_reply = '$wr_reply',
wr_comment = 0,
ca_name = '$ca_name',
wr_option = '$html,$secret,$mail',
wr_subject = '$wr_subject',
wr_content = '$wr_content',
wr_link1 = '$wr_link1',
wr_link2 = '$wr_link2',
wr_link1_hit = 0,
wr_link2_hit = 0,
wr_hit = 0,
wr_good = 0,
wr_nogood = 0,
mb_id = '{$member['mb_id']}',
wr_password = '$wr_password',
wr_name = '$wr_name',
wr_email = '$wr_email',
wr_homepage = '$wr_homepage',
wr_datetime = '".G5_TIME_YMDHIS."',
wr_last = '".G5_TIME_YMDHIS."',
wr_ip = '{$_SERVER['REMOTE_ADDR']}',
wr_1 = '$wr_1',
wr_2 = '$wr_2',
wr_3 = '$wr_3',
wr_4 = '$wr_4',
wr_5 = '$wr_5',
wr_6 = '$wr_6',
wr_7 = '$wr_7',
wr_8 = '$wr_8',
wr_9 = '$wr_9',
wr_10 = '$wr_10',
wr_11 = '$wr_11',
wr_12 = '$wr_12',
wr_13 = '$wr_13',
wr_14 = '$wr_14',
wr_15 = '$wr_15',
wr_16 = '$wr_16',
wr_17 = '$wr_17',
wr_18 = '$wr_18',
wr_19 = '$wr_19',
wr_20 = '$wr_20',
wr_21 = '$wr_21',
wr_22 = '$wr_22',
wr_23 = '$wr_23',
wr_24 = '$wr_24',
wr_25 = '$wr_25',
wr_26 = '$wr_26',
wr_27 = '$wr_27',
wr_28 = '$wr_28',
wr_29 = '$wr_29',
wr_30 = '$wr_30',
wr_31 = '$wr_31',
wr_32 = '$wr_32',
wr_33 = '$wr_33',
wr_34 = '$wr_34',
wr_35 = '$wr_35',
wr_36 = '$wr_36',
wr_37 = '$wr_37',
wr_38 = '$wr_38',
wr_39 = '$wr_39',
wr_40 = '$wr_40',
wr_41 = '$wr_41',
wr_42 = '$wr_42',
wr_43 = '$wr_43',
wr_44 = '$wr_44',
wr_45 = '$wr_45',
wr_46 = '$wr_46',
wr_47 = '$wr_47',
wr_48 = '$wr_48',
wr_49 = '$wr_49',
wr_50 = '$wr_50',
wr_51 = '$wr_51',
wr_52 = '$wr_52',
wr_53 = '$wr_53',
wr_54 = '$wr_54',
wr_55 = '$wr_55',
wr_56 = '$wr_56',
wr_57 = '$wr_57',
wr_58 = '$wr_58',
wr_59 = '$wr_59',
wr_60 = '$wr_60',
wr_61 = '$wr_61',
wr_62 = '$wr_62',
wr_63 = '$wr_63',
wr_64 = '$wr_64',
wr_65 = '$wr_65',
wr_66 = '$wr_66',
wr_67 = '$wr_67',
wr_68 = '$wr_68',
wr_69 = '$wr_69',
wr_70 = '$wr_70',
wr_71 = '$wr_71',
wr_72 = '$wr_72',
wr_73 = '$wr_73',
wr_74 = '$wr_74',
wr_75 = '$wr_75',
wr_76 = '$wr_76',
wr_77 = '$wr_77',
wr_78 = '$wr_78',
wr_79 = '$wr_79',
wr_80 = '$wr_80',
wr_81 = '$wr_81',
wr_82 = '$wr_82',
wr_83 = '$wr_83',
wr_84 = '$wr_84',
wr_85 = '$wr_85',
wr_86 = '$wr_86',
wr_87 = '$wr_87',
wr_88 = '$wr_88',
wr_89 = '$wr_89',
wr_90 = '$wr_90',
wr_91 = '$wr_91',
wr_92 = '$wr_92',
wr_93 = '$wr_93',
wr_94 = '$wr_94',
wr_95 = '$wr_95',
wr_96 = '$wr_96',
wr_97 = '$wr_97',
wr_98 = '$wr_98',
wr_99 = '$wr_99',
wr_100 = '$wr_100'
";
sql_query($sql);
$wr_id = sql_insert_id();
---------------------------
$sql = " update {$write_table}
set ca_name = '{$ca_name}',
wr_option = '{$html},{$secret},{$mail}',
wr_subject = '{$wr_subject}',
wr_content = '{$wr_content}',
wr_link1 = '{$wr_link1}',
wr_link2 = '{$wr_link2}',
mb_id = '{$mb_id}',
wr_name = '{$wr_name}',
wr_email = '{$wr_email}',
wr_homepage = '{$wr_homepage}',
wr_1 = '{$wr_1}',
wr_2 = '{$wr_2}',
wr_3 = '{$wr_3}',
wr_4 = '{$wr_4}',
wr_5 = '{$wr_5}',
wr_6 = '{$wr_6}',
wr_7 = '{$wr_7}',
wr_8 = '{$wr_8}',
wr_9 = '{$wr_9}',
wr_10 = '{$wr_10}',
wr_11 = '{$wr_11}',
wr_12 = '{$wr_12}',
wr_13 = '{$wr_13}',
wr_14 = '{$wr_14}',
wr_15 = '{$wr_15}',
wr_16 = '{$wr_16}',
wr_17 = '{$wr_17}',
wr_18 = '{$wr_18}',
wr_19 = '{$wr_19}',
wr_20 = '{$wr_20}',
wr_21 = '{$wr_21}',
wr_22 = '{$wr_22}',
wr_23 = '{$wr_23}',
wr_24 = '{$wr_24}',
wr_25 = '{$wr_25}',
wr_26 = '{$wr_26}',
wr_27 = '{$wr_27}',
wr_28 = '{$wr_28}',
wr_29 = '{$wr_29}',
wr_30 = '{$wr_30}',
wr_31 = '{$wr_31}',
wr_32 = '{$wr_32}',
wr_33 = '{$wr_33}',
wr_34 = '{$wr_34}',
wr_35 = '{$wr_35}',
wr_36 = '{$wr_36}',
wr_37 = '{$wr_37}',
wr_38 = '{$wr_38}',
wr_39 = '{$wr_39}',
wr_40 = '{$wr_40}',
wr_41 = '{$wr_41}',
wr_42 = '{$wr_42}',
wr_43 = '{$wr_43}',
wr_44 = '{$wr_44}',
wr_45 = '{$wr_45}',
wr_46 = '{$wr_46}',
wr_47 = '{$wr_47}',
wr_48 = '{$wr_48}',
wr_49 = '{$wr_49}',
wr_50 = '{$wr_50}',
wr_51 = '{$wr_51}',
wr_52 = '{$wr_52}',
wr_53 = '{$wr_53}',
wr_54 = '{$wr_54}',
wr_55 = '{$wr_55}',
wr_56 = '{$wr_56}',
wr_57 = '{$wr_57}',
wr_58 = '{$wr_58}',
wr_59 = '{$wr_59}',
wr_60 = '{$wr_60}',
wr_61 = '{$wr_61}',
wr_62 = '{$wr_62}',
wr_63 = '{$wr_63}',
wr_64 = '{$wr_64}',
wr_65 = '{$wr_65}',
wr_66 = '{$wr_66}',
wr_67 = '{$wr_67}',
wr_68 = '{$wr_68}',
wr_69 = '{$wr_69}',
wr_70 = '{$wr_70}',
wr_71 = '{$wr_71}',
wr_72 = '{$wr_72}',
wr_73 = '{$wr_73}',
wr_74 = '{$wr_74}',
wr_75 = '{$wr_75}',
wr_76 = '{$wr_76}',
wr_77 = '{$wr_77}',
wr_78 = '{$wr_78}',
wr_79 = '{$wr_79}',
wr_80 = '{$wr_80}',
wr_81 = '{$wr_81}',
wr_82 = '{$wr_82}',
wr_83 = '{$wr_83}',
wr_84 = '{$wr_84}',
wr_85 = '{$wr_85}',
wr_86 = '{$wr_86}',
wr_87 = '{$wr_87}',
wr_88 = '{$wr_88}',
wr_89 = '{$wr_89}',
wr_90 = '{$wr_90}',
wr_91 = '{$wr_91}',
wr_92 = '{$wr_92}',
wr_93 = '{$wr_93}',
wr_94 = '{$wr_94}',
wr_95 = '{$wr_95}',
wr_96 = '{$wr_96}',
wr_97 = '{$wr_97}',
wr_98 = '{$wr_98}',
wr_99 = '{$wr_99}',
wr_100 = '{$wr_100}'
{$sql_ip}
{$sql_password}
where wr_id = '{$wr['wr_id']}' ";
sql_query($sql);
답변 4
DB쪽 문제는 아닌듯한데,
input의 갯수가 제한되어 DB에 저장이 안되는듯..
php.ini 설정에서, max_input_vars 값이 75이상 안되게 잡혀있는건 아닌지
.htaccess
input 갯수가 제한되서 저장이 안되는 문제일 수 있겠네요.
PHP ini 설정에 max_input_vars 라는 값이 있습니다. 그게 75정도로 잡혀있는게 아닐까 싶은데요,
ini_set()으로 변경이 안되면
.htaccess 파일 내용추가
PHP_VALUE max_input_vars 100
DB 테이블에 해당 필드를 생성해줘야 합니다.
원래 기본값이 wr_10 까지 입니다.
wr_75 까지는 누군가 추가했었나 보내요..