2003-02-21 01:38:16 +00:00
|
|
|
<?php
|
|
|
|
require_once("util.inc");
|
|
|
|
require_once("user.inc");
|
|
|
|
require_once("db.inc");
|
|
|
|
|
|
|
|
db_init();
|
2003-03-19 21:01:32 +00:00
|
|
|
$user = get_logged_in_user();
|
2003-02-21 01:38:16 +00:00
|
|
|
|
|
|
|
$name = $HTTP_POST_VARS["user_name"];
|
2003-03-20 02:05:25 +00:00
|
|
|
$url = $HTTP_POST_VARS["url"];
|
2003-02-21 01:38:16 +00:00
|
|
|
$country = $HTTP_POST_VARS["country"];
|
|
|
|
$postal_code = $HTTP_POST_VARS["postal_code"];
|
|
|
|
|
2003-03-20 02:05:25 +00:00
|
|
|
$result = mysql_query("update user set name='$name', url='$url', country='$country', postal_code='$postal_code' where id=$user->id");
|
2003-02-21 01:38:16 +00:00
|
|
|
if ($result) {
|
2003-03-20 02:05:25 +00:00
|
|
|
Header("Location: home.php");
|
2003-02-21 01:38:16 +00:00
|
|
|
} else {
|
2003-03-20 02:05:25 +00:00
|
|
|
page_head("User info update");
|
2003-02-21 01:38:16 +00:00
|
|
|
echo "Couldn't update user info.";
|
2003-03-20 02:05:25 +00:00
|
|
|
page_tail();
|
2003-02-21 01:38:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|