This is my first time using ajax which i have being learning from the new Boston website. but i am getting the following error
error on line 8 at column 6: XML declaration allowed only at the start of the document
I tried removing white spaces which usually seems to be the fix but that didn't work. Any suggestions would be great.
<?php
header('Content-Type: text/xml');
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
echo '<response>';
$staus;
$email_in_use = $_GET['email'];
$query = mysqli_query($link, "SELECT * FROM emails WHERE email='".$email_in_use."'");
if(mysqli_num_rows($query) > 0){
$staus = false;
return $status;
}else{
// do something
if (!mysqli_query($con,$query))
{
die('Error: ' . mysqli_error($con));
}else{
$staus = true;
return $status;
}
}
echo '</response>';
?>