Anyone able to help with a PHP script by chance? menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    DoxramosPS's Avatar Knight
    Reputation
    26
    Join Date
    Aug 2010
    Posts
    214
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Anyone able to help with a PHP script by chance?

    So I found Aquaflame CMS which I'm quite fond of and I was wondering if anyone could help with the registration section of it.
    The current PHP code for the registration is set at
    PHP Code:
    mysql_select_db($server_adb,$connection_setup)or die(mysql_error());
                    
    $accinfoq mysql_query("SELECT * FROM account WHERE username = '".$accountName."'");
                    
    $accinfo mysql_num_rows($accinfoq);
              
                    if (
    $accinfo == 0)
                    {
                        
    $sha_pass_hashsha1(strtoupper($accountName ) . ":" strtoupper($accountPass));
                        
    $register_logon mysql_query("INSERT INTO account (username,sha_pass_hash,email,last_ip,expansion) VALUES (UPPER('".$accountName."'),  CONCAT('".$sha_pass_hash."'),'".$accountEmail."','".$ip."','3')")or die(mysql_error());
                  
                        
    mysql_select_db($server_adb,$connection_setup)or die(mysql_error());
                                  
    $accountinfo mysql_fetch_assoc(mysql_query("SELECT * FROM account WHERE username = UPPER('".$accountName."')"));
                        
    mysql_select_db($server_db,$connection_setup)or die(mysql_error());
                        
    $register_cms mysql_query("INSERT INTO users (id,class,firstName,lastName,registerIp,country,birth,quest1,ans1) VALUES ('".mysql_real_escape_string($accountinfo['id'])."','0','".$firstName."','".$lastName."','".$ip."','".$country."','".$dob."','".$question."',UPPER('".$answer."'))"); 
    I don't see any issues with the current setup, so if anyone has any idea please help. Thanks
    Last edited by DoxramosPS; 02-23-2013 at 06:57 PM.
    Mangos and Trinity Emulation
    Windows | Linux
    Under Development : morgangreen.org WoW CMS Site

    Anyone able to help with a PHP script by chance?
  2. #2
    ev0's Avatar ★ Elder ★ murlocs.com

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1850
    Join Date
    Jul 2012
    Posts
    2,737
    Thanks G/R
    313/377
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    7 Thread(s)
    So what's the problem, error wise? also wrap the code in the php /php tags.
    Need a guild in the US? Visit murlocs.com

  3. #3
    DoxramosPS's Avatar Knight
    Reputation
    26
    Join Date
    Aug 2010
    Posts
    214
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When the user goes to register it simply gives the error that a problem has occured; trying to put echo $register_logon but it's not displaying any results at all.
    Mangos and Trinity Emulation
    Windows | Linux
    Under Development : morgangreen.org WoW CMS Site

  4. #4
    ev0's Avatar ★ Elder ★ murlocs.com

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1850
    Join Date
    Jul 2012
    Posts
    2,737
    Thanks G/R
    313/377
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    7 Thread(s)
    Originally Posted by DoxramosPS View Post
    When the user goes to register it simply gives the error that a problem has occured; trying to put echo $register_logon but it's not displaying any results at all.
    I'd have to see how the whole page processes, but it looks like that you forgot a } at the end there to close the if statement.... Not sure if that's the error, but that's all i can see at this second. haha.
    Need a guild in the US? Visit murlocs.com

  5. #5
    ev0's Avatar ★ Elder ★ murlocs.com

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1850
    Join Date
    Jul 2012
    Posts
    2,737
    Thanks G/R
    313/377
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    7 Thread(s)
    Also, throw a die(mysql_error()); at the end of all the queries, see if we can print some sort of error
    Need a guild in the US? Visit murlocs.com

  6. #6
    DoxramosPS's Avatar Knight
    Reputation
    26
    Join Date
    Aug 2010
    Posts
    214
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Finally got it to output, but it only displays 1 in the query result. What could be used to try to help find the issue here?
    Sorry; just saw your newer posts. I'll give it a go and see what we can come up with.
    Mangos and Trinity Emulation
    Windows | Linux
    Under Development : morgangreen.org WoW CMS Site

  7. #7
    ev0's Avatar ★ Elder ★ murlocs.com

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1850
    Join Date
    Jul 2012
    Posts
    2,737
    Thanks G/R
    313/377
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    7 Thread(s)
    Originally Posted by DoxramosPS View Post
    Finally got it to output, but it only displays 1 in the query result. What could be used to try to help find the issue here?
    Sorry; just saw your newer posts. I'll give it a go and see what we can come up with.
    It displays a 1 because that user is found in the database. You want a 0, non-registered account.

    PHP Code:
    mysql_select_db($server_adb,$connection_setup)or die(mysql_error());
                    
    $accinfoq mysql_query("SELECT * FROM account WHERE username = '".$accountName."'");
                    
    $accinfo mysql_num_rows($accinfoq); 
    This queries the database, checks if the user name is already there. If the database returns with a result other than 0 it will error (error because your code doesn't have an }else{ )
    Need a guild in the US? Visit murlocs.com

  8. #8
    DoxramosPS's Avatar Knight
    Reputation
    26
    Join Date
    Aug 2010
    Posts
    214
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Odd; I checked the DB and the user doesn't exist =/
    Mangos and Trinity Emulation
    Windows | Linux
    Under Development : morgangreen.org WoW CMS Site

  9. #9
    ev0's Avatar ★ Elder ★ murlocs.com

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1850
    Join Date
    Jul 2012
    Posts
    2,737
    Thanks G/R
    313/377
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    7 Thread(s)
    Originally Posted by DoxramosPS View Post
    Odd; I checked the DB and the user doesn't exist =/
    Code doesn't lie. It's searching by username, mind you.
    Need a guild in the US? Visit murlocs.com

  10. #10
    DoxramosPS's Avatar Knight
    Reputation
    26
    Join Date
    Aug 2010
    Posts
    214
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah; gonna try to query the error and clear the databases out and see if maybe that resolves the issue.
    Mangos and Trinity Emulation
    Windows | Linux
    Under Development : morgangreen.org WoW CMS Site

  11. #11
    DoxramosPS's Avatar Knight
    Reputation
    26
    Join Date
    Aug 2010
    Posts
    214
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /register.php on line 174
    Line 174 is actually completely blank.
    Mangos and Trinity Emulation
    Windows | Linux
    Under Development : morgangreen.org WoW CMS Site

  12. #12
    ev0's Avatar ★ Elder ★ murlocs.com

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1850
    Join Date
    Jul 2012
    Posts
    2,737
    Thanks G/R
    313/377
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    7 Thread(s)
    Originally Posted by DoxramosPS View Post
    Code:
    Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /register.php on line 174
    Line 174 is actually completely blank.
    That's an error with your database connection lol.
    Need a guild in the US? Visit murlocs.com

  13. #13
    DoxramosPS's Avatar Knight
    Reputation
    26
    Join Date
    Aug 2010
    Posts
    214
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol yes it is! Double checked my website database and the issue lied in my script to update with the new values didn't work. Got the new values in and working like a charm =D Thanks a ton for the help.
    Mangos and Trinity Emulation
    Windows | Linux
    Under Development : morgangreen.org WoW CMS Site

  14. #14
    ev0's Avatar ★ Elder ★ murlocs.com

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1850
    Join Date
    Jul 2012
    Posts
    2,737
    Thanks G/R
    313/377
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    7 Thread(s)
    Originally Posted by DoxramosPS View Post
    lol yes it is! Double checked my website database and the issue lied in my script to update with the new values didn't work. Got the new values in and working like a charm =D Thanks a ton for the help.
    Always my pleasure, PHP is my life. I have it tattooed on my arm :P
    Need a guild in the US? Visit murlocs.com

  15. #15
    Fisher's Avatar Banned Hook you up! CoreCoins Purchaser
    Reputation
    1
    Join Date
    Jan 2012
    Posts
    359
    Thanks G/R
    0/1
    Trade Feedback
    16 (94%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Snicklesworth View Post
    Always my pleasure, PHP is my life. I have it tattooed on my arm :P
    I want to see that. And if its not mysql_select_tits no rep for you sir

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 4
    Last Post: 11-16-2012, 03:51 AM
  2. Need help with a PHP Script
    By Fireking300 in forum Programming
    Replies: 2
    Last Post: 06-13-2009, 02:27 PM
  3. Anyone willing to help with LUA scripting
    By nickeg in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 03-09-2008, 05:53 PM
  4. {question} Alil help with the .M2 script for 3DS max
    By BH5432 in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 01-17-2008, 07:55 PM
  5. anyone able to help
    By galataii in forum WoW ME Questions and Requests
    Replies: 12
    Last Post: 11-23-2007, 01:51 AM
All times are GMT -5. The time now is 07:58 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search