Warning: Trying to access array offset on value of type null in
C:\xampp\htdocs\ecommerce_cms_tutorial\register.php on line 172 }elseif ($row_register['email'] != $email && $password == $confirm_password) {
CodePudding user response:
This happens because $row_register is not null but the index 'email' does not exist (yet). because you are using newer version of PHP You will need to add the following:
isset($row_register['email'])
CodePudding user response:
You are dealing with a null array element: You have 2 options:
Use isset($arr['element'))
Use @ with array like @$arr['element'];
if(isset($row_register['email']){ // Enter your code here }