sniperscope Posted June 24, 2013 Share Posted June 24, 2013 Hello all Recently i have posting problem. I transfer my web page to new hosting server and since then i am facing problem with post data. I have a schedule form with 83 user which is posting one week schedule which means my form is posting 581 + (3 hidden form data) when i click Submit form. So far i have changed max_execution_time => 300 max_input_time => 600 memory_limit => 100M post_max_size => 80M upload_max_filesize => 80M in my previous server's values was 1/4 of above value and didn't have any problem even once. Output of my hidden value return NULL for testing purpose var_dump($_POST['test']); returns NULL even before and after form submission. Thank you for any help and/or idea Regards Quote Link to comment Share on other sites More sharing options...
iversonm Posted June 24, 2013 Share Posted June 24, 2013 Please post the php code and please post the form html. Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted June 24, 2013 Share Posted June 24, 2013 (edited) any chance the new server has the Suhosin hardened php patch installed? if so, the suhosin.post.max_vars default is 200. edit: also starting in php5.3.9, there is a php.ini setting max_input_vars. default is 1000, but perhaps your server has it set to a lower value. Edited June 24, 2013 by mac_gyver Quote Link to comment Share on other sites More sharing options...
sniperscope Posted June 24, 2013 Author Share Posted June 24, 2013 by the way i forgot to mention that my new server has php 5.4.10 and old one was 5.3.20 Quote Link to comment Share on other sites More sharing options...
sniperscope Posted June 24, 2013 Author Share Posted June 24, 2013 if(isset($_POST['id'])) { mysql_query("TRUNCATE TABLE work"); $sql = "INSERT INTO work(staff_id, Mon, Tue, Wed, Thu, Fri, Sat, Sun) VALUES "; $counter = count($_POST['id']); for($i=0; $i<$counter; $i++) { $Mon = ($_POST['From1'][$i] == $_POST['To1'][$i]) ? '~' : $_POST['From1'][$i] .'~'. $_POST['To1'][$i]; $Tue = ($_POST['From2'][$i] == $_POST['To2'][$i]) ? '~' : $_POST['From2'][$i] .'~'. $_POST['To2'][$i]; $Wed = ($_POST['From3'][$i] == $_POST['To3'][$i]) ? '~' : $_POST['From3'][$i] .'~'. $_POST['To3'][$i]; $Thu = ($_POST['From4'][$i] == $_POST['To4'][$i]) ? '~' : $_POST['From4'][$i] .'~'. $_POST['To4'][$i]; $Fri = ($_POST['From5'][$i] == $_POST['To5'][$i]) ? '~' : $_POST['From5'][$i] .'~'. $_POST['To5'][$i]; $Sat = ($_POST['From6'][$i] == $_POST['To6'][$i]) ? '~' : $_POST['From6'][$i] .'~'. $_POST['To6'][$i]; $Sun = ($_POST['From7'][$i] == $_POST['To7'][$i]) ? '~' : $_POST['From7'][$i] .'~'. $_POST['To7'][$i]; $sql .= "('" .$_POST['id'][$i]. "', '" .$Mon. "','" .$Tue. "','" .$Wed. "','" .$Thu. "','" .$Fri. "','" .$Sat. "','" .$Sun. "'),"; } $sql = substr($sql, 0, (strlen($sql) - 1)); $sql .= ";"; mysql_query($sql); header('location: index.php'); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.