Code: Select all
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("joc", $con);
if (isset($_POST['submit'])) {
$user_id=$_POST['user_id'];
$xp=$_POST['xp'];
mysql_query("UPDATE xp FROM users SET xp=$_POST['xp'] WHERE user_id='$user_id'")or die(mysql_error());
}
?>
<form action="insert_xp" method="post">
XP : <input type="text" name="xp" />
<input type="submit" value="submit">
</form>
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
07/26/09 22:05:17
Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9
Im a rookie in php so please be gentle.