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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.