Jump to content

Updating/Inserting


Solar

Recommended Posts

$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!

Link to comment
https://forums.phpfreaks.com/topic/200952-updatinginserting/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.