Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 27th, 2005, 10:16 AM   #11
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Are $userdata and $user_data supposed to be the same thing?

As for the
 
$link = mysql_connect('host', 'username', 'password') or die('Could not connect: ' . mysql_error());
that's just an expression evaluation and should work (as long as the second part is a function, like "die"). It's more robust to use an actual conditional, in my opinion, as Sykkn suggests. It's possible that another function in the first expression could function properly and still return a zero.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 27th, 2005, 11:03 AM   #12
theguy0000
Programmer
 
Join Date: Jul 2005
Posts: 73
Rep Power: 4 theguy0000 is on a distinguished road
as for the $userdata and $user_data thing, i have no ide :p

and no, evalution did not work.
theguy0000 is offline   Reply With Quote
Old Jul 27th, 2005, 12:23 PM   #13
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
For the connection error, I think I would bring up the mySQL command line and just run the connect statement by hand. That'll tell you whether or not the parameters to the call are correct. Your inclusion of the actual mySQL error is a good thing -- it lets you know there's an actual error and not just a bungup in the test for success. Once you get that resolved, then the rest of your problems can be banged out one at a time. You are definitely going to have to find out if you have two highly similar names ($userdata and $user_data). I doubt it.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 27th, 2005, 12:33 PM   #14
theguy0000
Programmer
 
Join Date: Jul 2005
Posts: 73
Rep Power: 4 theguy0000 is on a distinguished road
yeah, those variables are from phpbb

and thanks for the help!
theguy0000 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

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 On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:58 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC