Jump to content

[SOLVED] Row updating from another table?


A2xA

Recommended Posts

I'm integrating my 2 user systems and I need a table updated so whenever someone registers and I get an entry into the forum user table it also enters into the user table.  Is this possible?

 

My 2 tables are in the same database.

Link to comment
Share on other sites

I've tried this and I couldn't get it to work so I was seeing if I could just do this.  Cause the forum software I'm using is smf and the registration script is very complicated through different php files.  I'll try and mess with it some more though.

 

The code I was trying to use:

 

<?php
$name = $_POST['x'];
$user = $_POST['x'];
$pass = $_POST['x'];
$pass_c = $_POST['x'];
$email = $_POST['xl'];


// Insert user into the database
   $query = 'INSERT INTO users (userName, userUser, userPass, userEmail) VALUES ("' . $name . '", "' . $user . '", "' . md5($pass) . '", "' . $email . '")';
   mysql_query($query, $link);
?>

Link to comment
Share on other sites

if the query don't work and u don't know why error check it

<?php
$name = $_POST['x'];
$user = $_POST['x'];
$pass = $_POST['x'];
$pass_c = $_POST['x'];
$email = $_POST['xl'];


// Insert user into the database
   $query = 'INSERT INTO users (userName, userUser, userPass, userEmail) VALUES ("' . $name . '", "' . $user . '", "' . md5($pass) . '", "' . $email . '")';
   mysql_query($query, $link) or die(mysql_error()."<br /><br />\n\n".$query);
?>

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.