unemployment Posted April 29, 2011 Share Posted April 29, 2011 I need to check post values with existing database values and my check isn't working for the values below. //This one works if ((isset($_POST['companystageas'])) && ($_POST['companystageas'] != $info['stage'])) { $details = ''; update_company_actions($info['companyid'], 10, $details); } //These all fail if ((!isset($_POST['companystateas'])) && (($_POST['companycountryas'] != $info['country']) || ($_POST['city'] != $info['city']))) { $details = $_POST['companycityas'].', '.$_POST['companycountryas']; update_company_actions($info['companyid'], 11, $details); } else if ((isset($_POST['companystateas'], $_POST['companycityas'])) && (($_POST['companystateas'] != $info['state']) || ($_POST['companycityas'] != $info['city']))) { $details = $_POST['companycityas'].', '.$_POST['companystateas']; update_company_actions($info['companyid'], 11, $details); } if ((isset($_POST['capitalrequestedas'])) && ($_POST['capitalrequestedas'] != $info['capitalrequested'])) { $details = ''; update_company_actions($info['companyid'], 12, $details); } Quote Link to comment https://forums.phpfreaks.com/topic/235107-post-checks-mysql-and-fails/ Share on other sites More sharing options...
trq Posted April 29, 2011 Share Posted April 29, 2011 Seeing the definition for update_company_actions() would be useful. Quote Link to comment https://forums.phpfreaks.com/topic/235107-post-checks-mysql-and-fails/#findComment-1208429 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.