Skip to main content
September 12, 2008
Question

CONFUSION ON SELECTING DATABASE

  • September 12, 2008
  • 1 reply
  • 229 views
The code given below is working as desired on local/developing machine, while it is not returning same results on remote server. The user authenticates, returns his/her personalized options (e.g. name etc.), but when user click on 'log out' link it returns an error 'No database selected'. Please look at code and suggest to solve the issue.

Regards
This topic has been closed for replies.

1 reply

Inspiring
September 12, 2008
Nasik posted in macromedia.dreamweaver.appdev:

> $logoutGoTo = "../../index.php?node=bye&lang=us-en";
> if ($logoutGoTo) {
> header("Location: $logoutGoTo");
> exit;
> }

Two points.

1. Where are you selecting the database? If you have mysql_select_db()
in a different section of the code, say in the log in section, you
might want to move it to just under session_start() here. Or just
before mysql_query().

2. You're already inside the ($_GET['out']=="true") condition, so the
above if condition seems redundant.




--
Mark A. Boyd
Keep-On-Learnin' :)