" "){ $SQL = "select * from messages WHERE (ID ='$msg_id')"; $result = mysql_query($SQL) or die(mysql_error()); if($myrow=MySQL_fetch_array($result)){ $From_ID = $myrow["From_ID"] ; $To_ID = $myrow["To_ID"] ; $SQL = "select users.ID,users.First_Name, users.Last_Name from privacy,users where (privacy.deleted = 0) AND ((privacy.friend_id = users.ID) and (privacy.user_id = '" . $_SESSION["sessionUserID"] . "') and (privacy.friend_id = '" . $_REQUEST["grocery"]. "') and (grocery = 'W'))"; $result1 = mysql_query($SQL) or die(mysql_error()); if($myrow=MySQL_fetch_array($result1)){ $sqlupdate = "UPDATE privacy SET grocery = 'N' WHERE (friend_id ='$From_ID' and user_id = '" . $_SESSION["sessionUserID"]. "')"; $result = mysql_query($sqlupdate) or die(mysql_error()); $sqlupdate2 = "UPDATE privacy SET grocery = 'N' WHERE (user_id ='$From_ID' and friend_id = '" . $_SESSION["sessionUserID"]. "')"; $result2 = mysql_query($sqlupdate2) or die(mysql_error()); $message ="Your request to share the Grocery list was not accepted." ; $dateSent=date("Y-m-d") ; $timeSent = date("H:i") ; $msgTitle = "Grocery List Share Request" ; $sqlInsert = "INSERT INTO messages (From_ID, To_ID, Date_Sent, Time_Sent, Mark_As_Read, The_Text,msg_title)" ; $sqlInsert = $sqlInsert . " VALUES ('" . $_SESSION["sessionUserID"] . "','$From_ID','$dateSent','$timeSent','N','$message','$msgTitle')" ; $result2 = mysql_query($sqlInsert) or die(mysql_error()); $replyID = mysql_insert_id() ; $sqlupdate = "Update messages Set Reply_ID='$replyID' where ID='$replyID'"; $result2 = mysql_query($sqlupdate) or die(mysql_error()); $sqlupdate3 = "delete from messages WHERE (ID ='$msg_id')"; $result3 = mysql_query($sqlupdate3) or die(mysql_error()); $msg ="n" ; } else { header("Location: inbox.php"); } } } ?> yada home
     
 

 

Thank you. Your acceptance is confirmed. Your grocery list is now shared.

 

Go Back To your Messages      
 

 

Your grocery list WILL NOT be shared.

 

Go Back To your Messages      
 

 

By clicking "Accept" your grocery list will be shared with . By sharing a grocery list with another user, both your list and the 's grocery list combine.