Skip to content
View in the app

A better way to browse. Learn more.

GTAGames.nl - De Nederlandse Grand Theft Auto Community!

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MySQL Inlogsysteem

Hey,

Ik heb een MySQL inlogsysteem gemaakt (en deze werkt :sigaar:), alleen nu wil ik ook een autologin maken maar die werkt niet echt mee.

Als ik in de database in de rij "autologin" een waarde van 1 heb, weergeeft hij inderdaad 1; maar als ik hem terug naar 0 zet, weergeeft hij nog steeds 1..

Ik hoop dat iemand me kan helpen.

Code:

new query[128], escaped[2][128];

mysql_real_escape_string(playerip,   escaped[0]);
mysql_real_escape_string(playername, escaped[1]);

format(query, sizeof(query), "SELECT autologin, ip FROM users WHERE ip = '%s' AND name = '%s'", escaped[0], escaped[1]);

mysql_query(query);
mysql_store_result();

if(!mysql_num_rows())
    DIALOG_REGISTER
else
{
    new autologin;
    autologin = mysql_fetch_field(0, "autologin");

	printf("%d", autologin);
}

mysql_free_result();

Alvast bedankt,

Incognation.

----------

Opgelost :sigaar:

Edited by Incognation

Featured Replies

tip 1: probeer je probleem éerst op te lossen en als het dan niet lukt een topic te openen XD.

tip 2: voor de mensen die ook met MySQL werken (ik niet maarja) is het mischien handig als ook de oplossing van het probleem wordt gepost, als iemand namelijk met hetzelfde probleem te maken krijgt en hij gaat op internet zoeken en hij ziet deze pagina en er staat alleen onder "OPGELOST :puh:" dan gaat diegene waarschijnlijk ook vragen hoe je het heb opgelost.

  • Author

De fix was niet het allerbeste evâh, maar om het toch te geven: een extra query om te kijken of autologin aanstaat :puh:

edit; oeps sorry voor bump, ik begin blind te worden

Edited by Incognation

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.