I appreciate it!
Here's the current error after your revisions:
QuoteWarning: mysql_connect() [function.mysql-connect]: Access denied for user: 'xxxx_xxxx@localhost' (Using password: NO) in /home/xxxx/public_html/yabbse/restoreuser.php on line 6
Could not connect to MySQL
Here's what I'm using...
restoreuser.php
Quote
<?php
include_once("Settings.php");
global $db_server,$db_user,$db_pass,$db_name,$db_prefix;
$conn=mysql_connect($db_server,$db_user,$db_pass);
if(!$conn) {
die ("Could not connect to MySQL");
}
mysql_select_db($db_name,$conn) or die ("Could not open the requested database");
$user_get_query=mysql_query("SELECT ID_MEMBER FROM ".$db_prefix."members WHERE membername='XXXXX'");
$user_get=mysql_fetch_assoc($user_get_query);
mysql_query("UPDATE ".$db_prefix."messages SET ID_MEMBER='".addslashes($user_get['ID_MEMBER'])."' WHERE ID_MEMBER='-1'");
?>
where XXXX is the username that currently says guest.
On a side note, I've banned/deleted accounts in the past...is this going to attribute all "unclaimed" posts to his name if it does work since they're all guests?
Thanks!