|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| 09/27/2009 at 03:13PM PDT, ID: 24765588 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: |
<?php
include "../config.php";
$username = $_COOKIE['loggedin'];
if (!isset($_COOKIE['loggedin'])) die("You are not logged in, <a href=../login.html>click here</a> to login.");
mysql_connect($server, $db_user, $db_pass) or die (mysql_error());
mysql_select_db($database)
or die ("Could not select database because ".mysql_error());
mysql_query("UPDATE $table SET fname = '".$_POST['fname']."'
WHERE username = '$username'");
mysql_query("UPDATE $table SET lname = '".$_POST['lname']."'
WHERE username = '$username'");
mysql_query("UPDATE $table SET email = '".$_POST['email']."'
WHERE username = '$username'");
mysql_query("UPDATE $table SET password = '".$_POST['newpass']."'
WHERE password = '".$_POST['oldpass']."'");
mysql_query("UPDATE $table SET website = '".$_POST['website']."'
WHERE username = '$username'");
mysql_query("UPDATE $table SET avatar = '".$_POST['avatar']."'
WHERE username = '$username'");
echo "Changes made to $username's profile.<br /> <a href='profile.php'>Click here</a> to return to your profile.<br /> Please note if you entered in your old password incorrectly the new password will not change.<br />";
?>
|
Advertisement