Jump to content

milan

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by milan

  1. Hi Krydos,

     

    Thanks for your explanation, that is very helpful. I tried some of the followup suggestions from the stackoverflow post: running a local server using python, or using the npm http-server in windows command line, but those servers do not support the ajax post method. I also tried opening chrome with --allow-file-access-from-files but that doesn't seem to change anything.

     

    Do you have any recommendations/pointers for a simple solution?

     

    Thanks a lot!

     

    Milan

  2. Dear Krydos,

     

    Here's the error once again with the actual path to my local php file:

     

    XMLHttpRequest cannot load file:///C:/Users/milan/JavaScript/MySQL_posting/heliohost_mySQL_connectMethod_remote/userInfo.php. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

     

    Best,

    Milan

  3. Hey, Krydos, thanks! It worked on the local domain!

    When I try to connect remotely I get the following error:

    XMLHttpRequest cannot load [path to my php file connect file]

    Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https

     

    Any advice on how to go from there?

     

    Thanks a lot!

     

    Best,

    Milan

  4. Hi eveyone!

     

    I am using the following code to connect to my mySQL database:

     

    <?php
    // Create connection
    $conn = mysqli_connect('localhost', 'database_user_name', 'database_password');
    // Check connection
    if (!$conn) {
    die("Connection failed: " . mysqli_connect_error());
    }
    mysqli_select_db($conn,"database_name");
    ?>

     

    I tried several variants of this, replacing parameters:

    mysqli_connect('tommy.heliohost.org', 'database_user_name', 'database_password');

    mysqli_connect('localhost', 'database_name', 'database_password');

    mysqli_connect('tommy.heliohost.org', 'database_name', 'database_password');

     

    None of those seem to work. Could you please help me out figure out which host, username and password I should use to make this work. To note, my website is currently hosted on tommy.heliohost.org. Is this also true for mySQL database?

     

    In the next step I will be trying to connect remotely and it would be cool if you also let me know what the hostname for the external world looks like, and how do i log onto it.

     

    Thank you very much!

     

    Best,

    Milan

     

     

     

     

     

×
×
  • Create New...