I send a request to check_update.php page which its code is :
<?php
require_once 'C:/wamp/www/phpT/core/init.php';
$full_name=$_POST['full_name'];
$email=$_POST['email'];
$street=$_POST['street'];
$street2=$_POST['street2'];
$city=$_POST['city'];
$state=$_POST['state'];
$zip_code=$_POST['zip_code'];
$country=$_POST['country'];
$errors=array();
$required=array(
'full_name' =>'Full_name',
'email' =>'Email',
'street' =>'Street',
'city' =>'City',
'state' =>'State',
'zip_code' =>'Zip_code',
'country' =>'Country',
);
//check if all required fields are filled out
foreach($required as $f => $d){
if(empty($_POST[$f]) || $_POST[$f]==''){
$errors[]='حقل '.$f.' مطلوب';
}
}
if(!empty($errors)){
echo display_errors($errors);
}else{
echo true;
}
?>
and my ajax request code is :
jQuery.ajax({
url:'../admin/parsers/check_address.php',
method:'post',
data :data,//data that is been requested
success:function(resp){
if(resp != 1){
jQuery('#payment-errors').html(resp);
}
if(resp == true){
alert('hello');
}
},//this data is which is coming back from response
error:function(){alert('حدث خطأ ما');},
});
why i get this message Notice: Use of undefined constant - assumed '' in C:\wamp\www\phpT\admin\parsers\check_address.php on line 48 even though it is end php tag which is ?>