Problem Develop Login System - PHP + PDO

Get help using Construct 2

Post » Sun Apr 17, 2016 4:49 pm

Hello guys, this:

I'm trying to make a login system (name and email), I can use the old mysql (following the tutorials you have here in the Scirra site ), but when I put the server generates error - asks to use the PDO. In this, I am using the classse and when I use the example of " Webs pages " works correctly, but when I migrate to Construct 2 nothing happens.

PS : It took the tag "port=3306" to see if it was the error reason, without success!

Someone can identify this problem...

I do not know what to do!!

Imagens:
Image

Figure 1 - PHP code

Image
Figure 2 - Events in Construct
B
8
S
3
G
1
Posts: 21
Reputation: 1,200

Post » Thu Apr 21, 2016 4:35 pm

You should have your PHP server save the $nome and $email to a log file, so you can see if it is being transmitted properly. Then make sure those entries exist in your database exactly as is.

Also, make sure you are typing it in accurately.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Fri Apr 22, 2016 2:09 pm

Okay, thanks for answering ...
However, apparently this is how it? Because my question is whether I did right, because then I will analyze carefully where is the error?
B
8
S
3
G
1
Posts: 21
Reputation: 1,200

Post » Fri Apr 22, 2016 5:49 pm

There are a lot of different ways that authentication can go wrong, and the best way to debug this is by starting with your API.

Start here:
http://www.devshed.com/c/a/php/logging-with-php/
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Mon Apr 25, 2016 9:32 pm

Okay, gumshoe2029 ... :|
I could program a login.php file, however, can not show ( recover ) the user data ( name) in another layer. Can you tell me if and basically like this ?
And if not, can you tell me how I can do this?! :?:

Sorry for the delay is that lately I'm running out of internet. :!:

Image
Figure 1 - PHP code in order to make the Ajax Request

Image
Figure 2 - Events not Build 2 in order to make the Ajax Request
B
8
S
3
G
1
Posts: 21
Reputation: 1,200

Post » Fri Apr 29, 2016 3:36 pm

You might be able to use the browser logs in a debugger like Chrome Dev Tools or Firebug (for Firefox). This will at least show you what the browser thinks it is sending to your server. It will not show you what the server thinks that it is receiving though.

I don't know PHP, so I can't help you with the code itself, sorry.

The general idea though is to write those variables to a file on your server (which may be your computer if you are running the PHP on your computer), but PHP -- unlike JavaScript -- can write files to computers. Then you can open up that file and see if the username and password are correct.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 27 guests