0

I am having trouble with this code:

<?php
// Username
$username = $_POST['name'];

$email = $_POST['email'];

// MYSQL
$con = mysql_connect('host','username','password') or die();
mysql_select_db('db', $con);
$var = md5($email);

$result = mysql_query("UPDATE `table` SET `imageEs`='$var' WHERE user_username='{$_SESSION['sessid']}'") 
or die(mysql_error());  


echo "Profile image updated. <a href='http://www.awsomechat.comuv.com/update_profile.php'>Go back.</a>";

?>

I am trying to update a database, and this script seems to work, but it doesn't update or give any errors. I don't know what to do.

2
Contributors
2
Replies
4
Views
4 Years
Discussion Span
Last Post by Djmann1013
0

Your where clause is comparing the username to $_SESSION['sessid']

Make sure that session key matches the username. Also, make sure you have session_start(); at the top.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.