Jump to content
Adiii.zaneboy

Help Here XD

Recommended Posts

Posted

Salut baieti, am vazut ca va pricepeti la php :P

As dori si eu putin ajutor :P

Vedeti voi..eu am un site , nu sunt sigur daca pot posta linkul de la site here :D

Oricum, ce vreau eu si nu reusesc e ... cand intra cineva pe site "Login" sa se vada acolo ca e online. si cand iese sa fie offline .

ceva ca un shoutbox.

Daca stie cineva sa ma ajute , o sa le multumesc mult de tot. Am inebunit, am incercat tot ce am stiut

Posted (edited)

Foloseste o baza de date. In tabelul unde doresti sa tii utilizatorii sau starea utilizatorilor faci asa:

UPDATE tabel SET status = 1 WHERE userid=...

Si la query-ul care verifica status-ul:


$result = mysql_query("SELECT username, status FROM tabel WHERE userid=$uid");
if ($row = mysql_fetch_array($result)) {
echo $row["username"] . " is ";
if ($row["status"] = 1) echo "online";
if ($row["status"] = 0) echo "offline";
}

Edited by totti93

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.



×
×
  • Create New...