0

Getting Undefined index error on appointDate when running the code shown below:

$searchData = mysqli_query($connectme, "SELECT * FROM registration WHERE caseNo = '".$caseNo."'");
$row = mysqli_fetch_array($searchData);
//Fix date for entry to form to day,month,year for display purposes only
$dateFixYear = substr($row['appointDate'], 0,4);
$dateFixMonth = substr($row['appointDate'], 5,2);
$dateFixDay = substr($row['appointDate'], 8,2);
$dateFixed = $dateFixDay . "/" . $dateFixMonth . "/" . $dateFixYear;
$row['appointDate'] = $dateFixed;

I would like to find the error in the code rather than ignoring it using -

error_reporting(E_ERROR | E_PARSE);

Thanks in advance.

M. Schena
  • 2,039
  • 1
  • 21
  • 29

0 Answers0