Welcome, Guest. Please Login or Register.
November 25, 2024, 11:44:49 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  English User Help  |  English Help  |  Restore deleted member/profile « previous next »
Pages: 1 [2] Reply Ignore Print
Author Topic: Restore deleted member/profile  (Read 1659 times)
charlottezweb
Sr. Member
****
Posts: 446


charlottezweb.com

ICQ - 101387162 WWW
Re:Restore deleted member/profile
« Reply #15 on: May 28, 2003, 02:32:40 AM »
Reply with quote

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

"yabb-sense makes the heart grow fonder"
-----------------------------------------------------
Charlottezweb.com
Reliable, well-supported & affordable hosting and design.  Free Yabbse installs.
Douglas
aka The Bear
Support Team
YaBB God
*****
Posts: 1050


Bears rule! Llamas rule too!

WWW
Re:Restore deleted member/profile
« Reply #16 on: May 28, 2003, 04:29:11 AM »
Reply with quote

Let me write up a different script for you tomorrow, it'll be based on the principle of this one.  If you can, could you give me the URL to your forums, and a link to phpinfo.php?  I want to make sure that this script'll work on your site, if I write it up for you.

Thanks, and good night.  :)
Logged

Need help? Please SEARCH first.  No need for a bad attitude, we like helping positive minded people.
ComeHit.us Short URL  redirection svcs with YSE powered forums, COMING SOON!
Want to say thanks?  Check out http://comehit.us/?u=3
charlottezweb
Sr. Member
****
Posts: 446


charlottezweb.com

ICQ - 101387162 WWW
Re:Restore deleted member/profile
« Reply #17 on: May 28, 2003, 04:45:31 AM »
Reply with quote

Quote from: Douglas on May 28, 2003, 04:29:11 AM
Let me write up a different script for you tomorrow, it'll be based on the principle of this one.  If you can, could you give me the URL to your forums, and a link to phpinfo.php?  I want to make sure that this script'll work on your site, if I write it up for you.

Thanks, and good night.  :)

PM sent...and Thanks again!

Jason
Logged

"yabb-sense makes the heart grow fonder"
-----------------------------------------------------
Charlottezweb.com
Reliable, well-supported & affordable hosting and design.  Free Yabbse installs.
Pages: 1 [2] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  Restore deleted member/profile « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.062 seconds with 21 queries.