Location: PHPKode > projects > Akasha > favorite_update.php
<?

if ($akashaID == $ID) {
	include ("includes/global.inc"); 	// Global Variables
	include ("includes/functions.inc"); 	// Global Functions
	$user_id = findUserByHash($ID);

 	$query = "select user_id from tblFavorites where favorite_id = $favorite_id";
 	$result = mysql_db_query("$dbname",$query);
 	if($result) {
 		while ($r = mysql_fetch_array($result)) {
 			$auth_user = $r["user_id"];
		}
	}
	$user_id = findUserByHash($ID);
	if ($user_id != $auth_user) {
		Header("Location: main.php?error_code=1");		
	}

	$query = "update tblFavorites set url='$txturl',url_title = '$txttitle',fav_notes='$txtnotes' where user_id = $user_id and favorite_id = $favorite_id";

	Header("Location: favorites.php?ID=$ID");
} else {
		Header("Location: main.php?error_code=1");
}

?>
Return current item: Akasha