Jump to content

SANJISH

New Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by SANJISH

  1. Whenever i use echo in the php file the ajax call returns a Parserror. If i remove echo then the ajax call is a success. Hope that helps . I am at my wits end really . I tried calling phpinfo() . But it shows nothing. What do i do to set the Xampp server right. ?
  2. Whenever i use echo in the php file the ajax call returns a Parserror. If i remove echo then the ajax call is a success. Hope that helps . I am at my wits end really
  3. Even console.log does not work. In fact any of the output functions like print_r , var_dump etc are not working.
  4. Yes the script is working because when i use error_log(variable name) in the script i can view the values in apaches error logs .
  5. I checked the developer tools and there were no errors only the echo is not displaying the values
  6. Hi, This is my first post in this forum and am a PHP beginner. I have written a script in php and need to use echo to see the values of variables etc. However I dont get the output on the screen while using echo . I am using Xampp server with Apache. The startup.html file code is <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script> <title>Test Page</title> <script> $.ajax( { url: "http://localhost:8081/test.php", type: 'POST', dataType: 'text', data: {latitude: '7.15588546', longitude: '81.5659984458'}, success: function (response) { alert(response); }, error: function (response) { alert(response); } }); </script> </head> <body> <p>hello</p> </body> </html> and the test.php code is <?php $lat = $_REQUEST['latitude']; $lon = $_REQUEST['longitude']; echo 'latitude- '.$lat . ', longitude- ' . $lon; ?> Please help regards Sanjish
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.