PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Oct 15, 2019 10:26 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Tue Jun 10, 2003 11:46 pm 
Offline
Forum Newbie

Joined: Tue Jun 10, 2003 11:46 pm
Posts: 2
Location: Honolulu, HI


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 11, 2003 2:04 am 
Offline
Forum Contributor
User avatar

Joined: Thu Apr 25, 2002 9:34 pm
Posts: 232
Location: California USA
replace
Syntax: [ Download ] [ Hide ]
if(!$result) {

       echo "There was some sort of error, nice try ass!<br>";

        exit();

    }

with
Syntax: [ Download ] [ Hide ]
if(!$result) {

  echo mysql_error();

  die();

}

And let me know what happens.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 11, 2003 2:16 am 
Offline
Forum Regular
User avatar

Joined: Tue Jun 10, 2003 4:16 am
Posts: 343
Location: UK
You are trying to submit the form to it's self but you can't becuase you are trying to access "PHP_SELF" from a undefined array $SERVER.

Try $_SERVER['PHP_SELF'] (note the underscore).

Regards,


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 11, 2003 2:17 am 
Offline
Forum Newbie

Joined: Tue Jun 10, 2003 11:46 pm
Posts: 2
Location: Honolulu, HI
It says "No Database Selected"
I have triple-checked PHPMYADMIN and confirmed what I have for my DB is correct.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 11, 2003 2:23 am 
Offline
Forum Regular
User avatar

Joined: Tue Jun 10, 2003 4:16 am
Posts: 343
Location: UK
Try passing your connection ($db) to the mysql_select_db() method:

mysql_select_db("audiosla_arc", $db);

Try it, it may be that simple, other wise check the spelling of your database name, it's this silly things that always pass people by :)

Regards,


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 11, 2003 2:23 am 
Offline
Forum Regular

Joined: Thu Apr 24, 2003 6:51 am
Posts: 416
Location: The Netherlands
if you build software that doesn't run, use errorhandling to find a problem. I use errorhandling by default.
Syntax: [ Download ] [ Hide ]
mysql_select_db("audiosla_arc");

Can be replaced with...
Syntax: [ Download ] [ Hide ]
mysql_select_db("audiosla_arc") or die("databaseerror: ".mysql_error());


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group