Construct can not connect to database

0 favourites
  • 14 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • Hi. I chose a free host to test the game. I put the php code in it. When I copy and paste this address into the browser's address bar, the new record is well recorded.

    Http://*****.ihweb.com/try.php?username=ali

    But when I do this through construct (either post to url or request url) it does not work. Why ? what should I do ?

    The php code in the screenshot is as follows:

  • Most likely CORS issue. Press F12 and check console log for error messages.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Most likely CORS issue. Press F12 and check console log for error messages.

    I run preview on my pc , not on the site or any server , Is it still possible because of the cross domain problem?

  • Yes, press F12 in preview and check console messages. I bet you the issue is with CORS.

  • Yes, press F12 in preview and check console messages. I bet you the issue is with CORS.

    F12 dont work in construct preview page.what should i do ?

  • I could to open console massage:

  • Dop2000, you were right .

    How to fix it ?

  • use https

  • use https

    How do I use https? Is it enough to just add the phrase "https"? Or should my host have it inherently?

  • > use https

    How do I use https? Is it enough to just add the phrase "https"? Or should my host have it inherently?

    http is coming to an end, more and more services will reject connections without encryption.

    Your webhost, having the PHP files, should have https.

  • > > use https

    >

    > How do I use https? Is it enough to just add the phrase "https"? Or should my host have it inherently?

    http is coming to an end, more and more services will reject connections without encryption.

    Your webhost, having the PHP files, should have https.

    But the host I got for free gave me a domain that is http.

  • > > > use https

    > >

    > > How do I use https? Is it enough to just add the phrase "https"? Or should my host have it inherently?

    >

    >

    > http is coming to an end, more and more services will reject connections without encryption.

    >

    > Your webhost, having the PHP files, should have https.

    But the host I got for free gave me a domain that is http.

    Yup, here's an analogy, the bible claims some dude created the sun .... yet ... it rains

  • But the host I got for free gave me a domain that is http.

    Hey I am not as familiar with all of this, but you may be able to get a free SSL certificate (Google: let's encrypt) and apply this to your website to get https.

  • There are also "CORS proxy" services. I don't know if it's safe to use them, but if you are not sending any sensitive data, you can try one of these.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)