2003-02-21 01:38:16 +00:00
|
|
|
<?php
|
|
|
|
|
2005-02-13 06:13:33 +00:00
|
|
|
require_once("../inc/db.inc");
|
|
|
|
require_once("../inc/user.inc");
|
|
|
|
require_once("../inc/util.inc");
|
|
|
|
require_once("../inc/countries.inc");
|
2003-02-21 01:38:16 +00:00
|
|
|
|
2005-02-13 06:13:33 +00:00
|
|
|
db_init();
|
|
|
|
$user = get_logged_in_user();
|
2003-02-21 01:38:16 +00:00
|
|
|
|
2005-02-13 06:13:33 +00:00
|
|
|
$name = process_user_text(post_str("user_name"));
|
2005-02-22 19:37:55 +00:00
|
|
|
$name = strip_tags($name);
|
2005-02-13 06:13:33 +00:00
|
|
|
$url = process_user_text(post_str("url"));
|
2005-02-26 06:23:32 +00:00
|
|
|
$url = strip_tags($url);
|
2005-02-13 06:13:33 +00:00
|
|
|
$country = post_str("country");
|
|
|
|
if (!is_valid_country($country)) {
|
2005-02-22 19:37:55 +00:00
|
|
|
error_page("bad country");
|
2005-02-13 06:13:33 +00:00
|
|
|
}
|
|
|
|
$postal_code = process_user_text(post_str("postal_code"));
|
2005-02-22 19:37:55 +00:00
|
|
|
$postal_code = strip_tags($postal_code);
|
2005-02-13 06:13:33 +00:00
|
|
|
|
|
|
|
$result = mysql_query("update user set name='$name', url='$url', country='$country', postal_code='$postal_code' where id=$user->id");
|
|
|
|
if ($result) {
|
|
|
|
Header("Location: home.php");
|
|
|
|
} else {
|
|
|
|
page_head("User info update");
|
|
|
|
echo "Couldn't update user info.";
|
|
|
|
page_tail();
|
|
|
|
}
|
2003-02-21 01:38:16 +00:00
|
|
|
|
|
|
|
?>
|