Jump to content

maryjane9110024

New Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by maryjane9110024

  1. Quickoldcar, I wish I could prevent them but with the form if they remove information and want to update then it will display and insert zeros into the database which is what i don't want to happen. so if the user removes the date from the field i want it to be null instead of zeros if that makes any sense?
  2. yea that I know but I'm talking about with what Ch0cu3r said in his post above.
  3. Thank you all for the information!! What if someone was deleting an entry that was entered? How would that update the value to null or empty?
  4. I tried removing the quotes and having it as bos_meeting_date=". $date_appeal_received .", but it bombs when there is a value. How do I dynamically build a query? I get a different answer every link I looked at in my Google results. I just checked and the default is null for those fields.
  5. I am trying to update the database with isset to set the value of the variable to either null or the value entered by the user. Currently, if no value has been entered null is being set as a string causing the date field to populate with zeros. How do I code it so that it populates or sets the value as null and not as string null? Here's my code: (yes I know sql injections it's still in development ) <?php require_once('../config.php'); $parcel_id = isset($_GET['parcel_id']) ? $_GET['parcel_id'] : null; //$appeal_address_match = isset($_POST['AppealAddressMatch']) ? 1 : 0; (add to sql statement -- appeal_address_match='". $appeal_address_match ."',) $date_appeal_received = isset($_POST['DateAppealReceived']) ? $_POST['DateAppealReceived'] : null; $bos_meeting_date = isset($_POST['BosMeetingDate']) ? $_POST['BosMeetingDate'] : null; $late_returns_date = isset($_POST['LateReturnsDate']) ? $_POST['LateReturnsDate'] : null; $determination_notice = isset($_POST['DeterminationNoticeSet']) ? $_POST['DeterminationNoticeSet'] : null; $final_determination = isset($_POST['FinalDetermination']) ? $_POST['FinalDetermination'] : null; $analysis_recommendation = isset($_POST['AnalysisRecommendation']) ? $_POST['AnalysisRecommendation'] : null; $email_address = isset($_POST['EmailAddress']) ? $_POST['EmailAddress'] : null; $phone_number = isset($_POST['PhoneNumber']) ? $_POST['PhoneNumber'] : null; if(isset($_GET['parcel_id'])) { $db = new ezSQL_mysql(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST); $result = $db->query("UPDATE parcels SET date_appeal_received='" . $date_appeal_received . "', bos_meeting_date='". $date_appeal_received ."', late_returns_date='". $late_returns_date ."', determination_notice_sent_date='". $determination_notice ."', final_determination='". $final_determination ."', analysis_recommendation='". $analysis_recommendation ."', email_address='". $email_address ."', phone_number='". $phone_number ."' WHERE parcel_id='" . $parcel_id ."'"); /*if ($result == TRUE) { echo '{"success":true}'; } else { echo '{"success":false}'; } */ if($result) echo 'true'; else echo 'false'; } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.