Is there a way to get PHP to return an AJAX error code if the PHP script fails somewhere?
I was following a tutorial and typed this in to my PHP:
$return['error'] = true;
$return['msg'] = "Could not connect to …
Yes, I have googled this question and even referred to my textbook (PHP by Don Gosselin) but I seriously can't seem to understand the explanation.
From my understanding:
echo = shows the final result of a function
return = returns the value …
I want to get contents of a .php file in a variable on other page.
I have two files, myfile1.php and myfile2.php.
myfile2.php
<?PHP
$myvar="prashant"; //
echo $myvar;
?>
Now I want to get the value …