Location: PHPKode > projects > MyBlog: PHP and MySQL Blog/CMS software > os/files/taxman - Copy.php
<?php
require("config/settings.inc");
require("config/mysqlconnection.inc");
if ($_COOKIE['login'] == $_GET['id']) {
echo "<h2>Update Your Profile</h2>";

if (empty($_POST['interests'])) {
echo "<p>Leave a field blank if you do not want to update it.</p>";
echo "<form action=\"member.php\" method=\"post\">";
echo "<textarea name=\"interests\">Add some notes about you...</textarea><br />";
echo "<input type=\"text\" name=\"username\" value=\"Change your username...\">";
echo "<br /><input type=\"text\" name=\"website\" value=\"Change your website...\">";
echo "<br /><input type=\"text\" name=\"name\" value=\"Change your real name...\">";
echo "<input type=\"submit\" />";
echo "</form>";
}

else {
$user = $_COOKIE['login'];
$interests = $_POST['interests'];
$username = $_POST['username'];
$website = $_POST['website'];
$name = $_POST['name'];

echo $name;
if (isset($_POST['interests'])) {
$result = mysql_query("UPDATE myblog_users SET interests='$_POST[interests]' WHERE user = '$_COOKIE[login]'") 
or die(mysql_error());
echo "Interests Updated!<br />";
}
else {
}

if (isset($_POST['username'])) {
$result = mysql_query("UPDATE myblog_users SET user='$_POST[username]' WHERE user = '$_COOKIE[login]'") 
or die(mysql_error());
echo "Username Updated!<br />";
}
else {
}


if (isset($_POST['website'])) {
$result = mysql_query("UPDATE myblog_users SET website='$_POST[website]' WHERE user = '$_COOKIE[login]'") 
or die(mysql_error());
echo "website Updated!<br />";
}
else {
}


if (isset($_POST['name'])) {
$result = mysql_query("UPDATE myblog_users SET name='$_POST[name]' WHERE user = '$_COOKIE[login]'") 
or die(mysql_error());
echo "Name Updated!<br />";
}
else {
}
}
}
?>
Return current item: MyBlog: PHP and MySQL Blog/CMS software