Callback function of $.get logs only two asterisks.
Hello,
I am trying to use "console.log" to view the response of the server. My code is as follows :
- <script type="text/javascript">
- $.get("process.php", function(response){
- console.log(response);
- });
- </script>
And the only thing my browser logs are two asterisks. The PHP code was as the code below:
- <?php
- if ($_GET){
- $rec = $_GET["name"];
- $msg = "Welcome, " . $rec . "!";
- return $msg;
- } else {
- return "No data recieved by the Server";
- }
- ?>
Would you be kind to guide me throught solving this problem?
Thank you very much in advance.