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); } 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. 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
Archived
This topic is now archived and is closed to further replies.