Current location: Hot Scripts Forums » Programming Languages » PHP » MySQL help please (simple questions)


MySQL help please (simple questions)

Reply
  #21 (permalink)  
Old 05-05-09, 05:13 PM
bluedogsb bluedogsb is offline
Newbie Coder
 
Join Date: Jan 2009
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Alright well I re-did everything. I even took the script and put just the script on my server only change the constants so it went to the database correctly and I end up with my original problem I got from the get go and that's the registration FAILED... I'm about to just give up or pay someone.

Then after getting the registration failed I changed in sessions.php
Code:
/* No errors, add the new account to the */
      else{
         if($database->addNewUser($subuser, md5($subpass), $subemail)){
            if(EMAIL_WELCOME){
               $mailer->sendWelcome($subuser,$subemail,$subpass);
            }
            $retval == 0;  //New user added succesfully **This was return 0; 
         }else{
            $retval == 2;  //Registration attempt failed **This was return 2;
When that's changed the registration works. BUT when I login, the username is NOT found. And again I am using the original script, not even using my site, just the script on my server and it's not working "out the box" like everythone says. I should only have to change constants.php in order for it to work right? Just the database stuff right?

Last edited by bluedogsb; 05-05-09 at 05:24 PM.
Reply With Quote
  #22 (permalink)  
Old 05-05-09, 08:28 PM
outhowz42 outhowz42 is offline
Newbie Coder
 
Join Date: Jun 2008
Location: USA
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
How can I help better?

When registration fails, don't change anything in sessions. You should change it back to what it was. Return 0 or Return 1.

Your database is probably not set up correctly to match the script (as pointed out earlier in this thread).

Maybe you can zip the entire thing and put it here for me to look at. Also send me the description of the tables in the database and I will look through it all.
__________________
www.sportsloon.com
Reply With Quote
  #23 (permalink)  
Old 05-06-09, 10:00 AM
bluedogsb bluedogsb is offline
Newbie Coder
 
Join Date: Jan 2009
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Yeh, I've tried getting a hold of my friend to see if he has set everything up correctly for me, but it's been hit and miss getting info from him.

As for sending a description of the tables in the database; not exactly sure what you mean by this. This is ringing a "duuhhhh" bell meaning 'no wonder this won't work'.

Could I just set up my own database(a new one) on his server? All I know is he said my database was
username: root
password: elite1baller
database name: sanderblue

*note: my username when connecting to his server through file transfer program is 'sblue' and if I use this name in constants.php for the user I get the error "Access denied: 'sblue@locahost' using: YES" or something like that.

So I used those in constants.php... as for anything else having to do with the database I have no clue. This is my first time using MySQL to this extent. I'll keep trying to ask my buddy what the deal is.
Reply With Quote
  #24 (permalink)  
Old 05-06-09, 10:54 AM
bluedogsb bluedogsb is offline
Newbie Coder
 
Join Date: Jan 2009
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
how do i delete a post?

Last edited by bluedogsb; 05-06-09 at 11:00 AM.
Reply With Quote
  #25 (permalink)  
Old 05-06-09, 04:19 PM
bluedogsb bluedogsb is offline
Newbie Coder
 
Join Date: Jan 2009
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Outhowz42 - do you have a screen name on AIM or MSN or anything?

I promise I won't bother you. Also I figured out my problem. I really appreciate your input. The system now works flawlessly for the most part. I will want to add some things I'm sure.

I also noticed you are an engineer... I'm graduating with an architecture degree in few months; think I'll get a job? haha
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
MySQL to MSSQL questions phpdoctor Database 4 12-05-07 01:13 PM
MySQL Questions KeYBLeR PHP 4 04-10-06 02:30 PM
Two very simple questions xxvatarxx PHP 1 12-04-05 12:48 PM
Several questions for PHP and MySql starting in Windows XP artaco2000 PHP 4 10-14-04 12:25 PM


All times are GMT -5. The time now is 08:34 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.