Jump to content

Mysql nu isi face update cand esti logat.


Recommended Posts

Salut, am inceput sa dezvolt o platforma de support de la 0 pentru diferite servere, csgo/metin2 etc. Insa am descoperit o problema cand vreu sa dau grad de developer la cineva nu isi face update cand esti logat. Daca dai relog iti schimba gradul.

Daca nu dau relog apare asa

8GvehtW.png

Dupa relog revine cum trebuie

AIR6kV5.png

Chiar nu imi dau seama unde e problema.

Edited by xSaG
Link to post
Share on other sites

35 minutes ago, Stefan said:

Deci trebuie sa te deconectezi si sa te conectezi ca sa se actualizeze gradul? Pune secventa de cod in care faci update

mysql_query("UPDATE users SET grad='$grad' WHERE userid='$_SESSION[userid]'");

 

Edited by xSaG
Link to post
Share on other sites
  • 3 weeks later...

Problema este modul de logare, incearca la logare sa salvezi doar id-ul respectivului user, iar printro functie sa ii apelezi numele, gradul sau ce mai doresti tu (ex: function get_user_grad($id)) $id reprezentand $_SESSION['userid'], actualizarea se va face automat fara a trebui sa te deloghezi.

 

  • Like 2

Filme: Click.

Contact: Steam

Link to post
Share on other sites

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.