why this not update my database i have another page where form and it send all data to this
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
</head>
<body>
<?php
$hostname = "localhost";
$username = "";
$password = "";
$usertable = "users";
$dbName = "myusers";
MYSQL_CONNECT($hostname, $username, $password) OR DIE("Unable to connect to database"
mysql_select_db($dbName) or die( "Unable to select database"
$result = mysql_query("
UPDATE $usertable
SET
user_fname = '$user_fname',
user_lname = '$user_lname',
user_pass = '$user_pass',
user_mail = '$user_mail',
hollow_point = '$hollow_point',
hollow_cash = '$hollow_cash',
referrer_id = '$referrer_id',
referrer_cash = $referrer_cash',
WHERE user_id = '$user_id'"
if ($result) :
print "Osasto $user_id päivitetty: ";
print "$user_fname, $user_lname, $user_pass, $user_mail, $hollow_point, $hollow_cash, $referrer_id, $referrer_cash";
else :
print "Päivitys epäonnistui!";
endif;
?>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
</head>
<body>
<?php
$hostname = "localhost";
$username = "";
$password = "";
$usertable = "users";
$dbName = "myusers";
MYSQL_CONNECT($hostname, $username, $password) OR DIE("Unable to connect to database"
mysql_select_db($dbName) or die( "Unable to select database"
$result = mysql_query("
UPDATE $usertable
SET
user_fname = '$user_fname',
user_lname = '$user_lname',
user_pass = '$user_pass',
user_mail = '$user_mail',
hollow_point = '$hollow_point',
hollow_cash = '$hollow_cash',
referrer_id = '$referrer_id',
referrer_cash = $referrer_cash',
WHERE user_id = '$user_id'"
if ($result) :
print "Osasto $user_id päivitetty: ";
print "$user_fname, $user_lname, $user_pass, $user_mail, $hollow_point, $hollow_cash, $referrer_id, $referrer_cash";
else :
print "Päivitys epäonnistui!";
endif;
?>
</body>
</html>