Solar Posted May 6, 2010 Share Posted May 6, 2010 $RETVAL For example; $_POST['username'], $_POST['password'], $_POST['email'], $_POST['age'], $_POST['gender'], $_POST['status'], $_POST['about']/*..etc /* Account edit successful */ if($retval){ $_SESSION['useredit'] = true; header("Location: ".$session->referrer); } After a user has edit their profile; I would like from a different table from the same database to update itself saying "Solar has updated their profile". The table for user's information is "login" and the table I want to update as well is called "update" I would love the table "update" to look like this (allready made, just need it to be inserted); idnamedescription 1Solarhas updated their profile. 2Stevenhas updated their profile. I was thinking something like this; mysql_query("INSERT INTO update (name, description) VALUES ('$session->username', 'has updated their profile')"); But I am having problems putting this puzzle together. I would be happy if someone can get me started P.s. Would I have to close off the first mysql connection before making another one? Or would that work. If there is a mysql code that could also do this trick automatically, that would be amazing! Thanks in advanced! Quote Link to comment Share on other sites More sharing options...
siric Posted May 7, 2010 Share Posted May 7, 2010 At first glance, looks ok to me. What exact problems are you having?? Have you tried it?? Quote Link to comment Share on other sites More sharing options...
Solar Posted May 7, 2010 Author Share Posted May 7, 2010 Yes, Nothing is updating in the "update" table.. I will keep messing around.. I thought I was coding properly, I may have a mis-spelling problem. I will keep checking my coding. Quote Link to comment Share on other sites More sharing options...
Solar Posted May 7, 2010 Author Share Posted May 7, 2010 LAWL. Imma idiot. Teehee. I have a table called Update... The $SQL was trying to update a row that did not exist, I renamed the table and now its doing what I want it to do. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.