[HELP, PLEASE] Database used in the Construct 2

Get help using Construct 2

Post » Tue Jul 26, 2016 12:55 pm

Message: Cyelho Lima can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hello, Saad Swad, thank you very much. Now, when I test the Construct 2 he asked that I lowered the nwjs https://www.scirra.com/nwjs, at last, to my knowledge the NWJS Allows you to make Windows, Mac and Linux games with Construct 2. Anyway, my project is for the Android platform... Can you tell if it works on mobile devices or only on Desktop?

Already, friend, gradeço and for your help!!

Image
B
8
S
3
G
1
Posts: 21
Reputation: 1,200

Post » Tue Jul 26, 2016 1:00 pm

@Cyelho Lima Just change "Preview browser" in project propreties. This project works only on your PC, if you want use it on all plateforms you have to use a real php server and not wamp (or lamp or xamp...)
B
17
S
10
G
19
Posts: 140
Reputation: 11,457

Post » Tue Jul 26, 2016 1:06 pm

if you set
$email = $_GET['email'];
$senha = $_GET['senha'];

check befor $_GET['theName'] is set with:
if(isset($_GET['email'])){
$email = $_GET['email'];
}

On a public server only a server log like
[warning] ... not set variable: $_GET['email']
but it is a better way to fix it ...
B
5
S
1
Posts: 24
Reputation: 423

Post » Tue Jul 26, 2016 1:08 pm

Saad Swad, yes, I did it, friend! Because to see that you used the NWJS thought I could have some difference with the android devices. Oh, you did the same example database that I posted? I tried to save user information and not saved ... I created the same page my-site , so possessed the same way...

Sorry for asking too much!
B
8
S
3
G
1
Posts: 21
Reputation: 1,200

Post » Tue Jul 26, 2016 1:10 pm

@BillAlex, excuse me, but did not understand!
B
8
S
3
G
1
Posts: 21
Reputation: 1,200

Post » Tue Jul 26, 2016 1:12 pm

Ok, first you have to edit some informations in the php files like host, table name, ect...

Then like @BillAlex says, this is a basic thing, you have to secure this scripts and improve them...

If this don't work, tell me that because I didn't test if it works...
B
17
S
10
G
19
Posts: 140
Reputation: 11,457

Post » Tue Jul 26, 2016 1:29 pm

@Cyelho-Lima
If the PHP code is called without GET request the server produces an warning-error because $_GET['email'] do not exist
The script should still function but it is better to check if the GET-Request ['email'] and ['senha'] exist
CODE:
if(isset($_GET['email'])){
$email = $_GET['email'];
}

I meen the function 'isset()' ...

The variable for the e-mail will be delivered only if a GET-Request exist ... the AJAX code prevents this already, but for a good and safe programming you should not trust on it.
B
5
S
1
Posts: 24
Reputation: 423

Post » Tue Jul 26, 2016 1:47 pm

Saad Swad, What you did is running normally, right? Because I'm trying here and're not saving, you log in with the same wrong information...

@BillAlex Thank for the help (review), but I think I can not do this... a long time I'm trying, and nothing. I think I'll give up... bad idea to think that I could!!

Sorry for creating the post!!
B
8
S
3
G
1
Posts: 21
Reputation: 1,200

Post » Wed Jul 27, 2016 10:32 am

@Cyelho-Lima
Realize that you can't do something never hurts. But to give up is not the right way. For everything you want to do you need the basics ...
If you want to create a login system via PHP you have to know how PHP works ...

Nice tutorials are at http://www.w3schools.com
But that should be no advertising here. I find it described simply easy with a simply english ...

All beginning is hard 8-)
I programmed for about 2 years and I have sometimes the same problem: It won't work.
And you always learn new things again :D
B
5
S
1
Posts: 24
Reputation: 423

Previous

Return to How do I....?

Who is online

Users browsing this forum: wossi and 24 guests