0 Users appreciate this thread.
Simple Point system
wellsandlava (2013-11-25 19:26:15)I Thought we told u how to make one its very simple. i just don't have the time to make it for you.
This account is under a new owner
PLMasterSSB (2013-11-26 00:51:36)I thought I told you how already. Build an AJAX chat first and I'll show you how.
^ Click
(This Image was created from cooltext.com)
Log in to submit a comment
Back to forum: Web Programming (HTML, JS, CSS, PHP, MySQL)
New registered users today: 7
Newest registered user: ElegantVulpes
Well if you a simple one (like in a chat), make that the chat. (Your chat needs to be a reloaded chat, a chat that needs to be reloaded everytime to see new messages, based on how I'm gonna tell you).
Make a column in one of the tables (I prefer in your users table) and set it as VARCHAR 15 and maybe you can set default as 50. Then start the coding:
<?php
// checks if message has been sent
If(isset($_POST['name of the text input type'])) {
// you can put $_GET based on what form method your using
// run a query, this is where the users system was preffered
$variablename = mysql_query("SELECT * FROM nameoftable WHERE nameofcolunm='$_SESSION[username]'"
// you may put $_COOKIE based on what you set your user variable as when logged in.
// then create variables
while($row = mysql_fetch_assoc ($name of the variable that ran the query)) {
$variablename = $row['name of the username column in the users table'];
}
$variablename = $name of the variable right above + 1;
// you can put WHATEVER number you want to add whenever someone sends a message
// then run another mysql query
Mysql_query("UPDATE name of table SET name of colunm='$name of variable that adds the points' WHERE nameofcolunm='$_SESSION[username]'"
}
// again, you can put $_COOKIE based on what you set you user variable as when logged in.
?>
This explanation may be very bad. You can PM me for a better explanation.
2013-10-14 13:58:39
^ Click
(This Image was created from cooltext.com)