Aravinthan
New Member
- Messages
- 68
- Reaction score
- 0
- Points
- 0
Hi,
I am doing a ladder for my clan website. I already have a database for the tournament( points which is INT and eso(username0 which is Varchar). What I need is that, that I can add points to ppl after a game. So i tought of doing this a form that asks the username of the player and how much to be added:
And here is my MYSQL update script(update_final.php)
But I get this error:
I am doing a ladder for my clan website. I already have a database for the tournament( points which is INT and eso(username0 which is Varchar). What I need is that, that I can add points to ppl after a game. So i tought of doing this a form that asks the username of the player and how much to be added:
Code:
<form name="Join Tournament" action="update_final.php" method="post">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
User's ESO to be updated:
</td>
<td>
<input type="text" name="user">
</td>
</tr>
<tr>
<td>
Points to be added:
</td>
<td>
<input type="text" name="newp">
</td>
</tr>
<tr>
<td>
<input type="submit" name="submit" value="Submit">
<input type="reset" name="reset" value="Reset">
</td>
</tr>
</table>
</form>
And here is my MYSQL update script(update_final.php)
Code:
<?php
$user = $_POST['user'];
$newp = $_POST['newp'];
$point = $newp + points;
mysql_connect("localhost", "user", "pass") or die(mysql_error());
mysql_select_db("db") or die(mysql_error());
mysql_query("UPDATE wrwrtc SET points=$point WHERE eso=$user")
or die(mysql_error());
echo "The player got succesfully his points. <a href='home.php'>Go back</a>";
?>
THanks for your help.Unknown column 'Aravinthan' in 'where clause'
Last edited: