2003-02-21 01:38:16 +00:00
< ? php
2004-02-02 23:34:39 +00:00
require_once ( " ../inc/db.inc " );
require_once ( " ../inc/user.inc " );
require_once ( " ../inc/util.inc " );
2003-02-21 01:38:16 +00:00
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-11-28 23:11:22 +00:00
$signature = $HTTP_POST_VARS [ " signature " ];
2003-02-21 01:38:16 +00:00
2003-11-30 21:05:57 +00:00
$result = mysql_query ( " update user set name=' $name ', url=' $url ', country=' $country ', postal_code=' $postal_code ', signature=' $signature ' 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
}
?>