<?php
$resource1 = mysql_connect(localhost, admin_plus, -----);
$db = mysql_select_db(admin_plus, $resource1)
or die ("Couldn't select database.");
$resource2 = mysql_connect(localhost,admin_image,-----);
$db = mysql_select_db(admin_image, $resource2)
or die ("Couldn't select database.");
$sql = "SELECT id FROM -members";
$query = mysql_query($sql, $resource1);
for ($i=0;$i<($result = mysql_fetch_assoc($query));$i++) {
mysql_query("INSERT INTO users ('uid') VALUES('id') ($resource2");
}
mysql_close($resource1);
mysql_close($resource2);
?>
Wel i have been trying and searching, but best i could come up with is this, which does not work. Can you please help by just correcting it, thanks for your time. As i said ive been searching. I basically want to copy,the id column from the members table, into the uid column in the users table.
Thanks