Reply to Re: No database selected

Your name:

Reply:


Posted by Shelly on 05/23/05 05:43

"Dave" <dave@REMOVEbundook.com> wrote in message
news:7hq7m2-p5t.ln1@fawlty.homelinux.net...
> While your test machine may have only one (default) database, your
> remote machine will probably require you to specify which db you
> want to use... you can do this right after you connect with a call
> such as
> $status = mysql_select_db($database_ssLogin, $ssLogin);
>
> As an aside, are you sure your webhost allows persistent connections?
> I wouldn't have thought so, but a few might I suppose.

I had one already there:
mysql_select_db($database_ssLogin, $ssLogin);
$encryptedPassword = md5($_POST["password"]);
$LoginRS__query=sprintf("SELECT username, password, level, status
FROM ssusername WHERE username='%s' AND password='%s'",
get_magic_quotes_gpc() ? $loginUsername :
addslashes($loginUsername),
$encryptedPassword);
$LoginRS = mysql_query($LoginRS__query, $ssLogin) or die(mysql_error());

where it fails.

Here is a possiblity. Tell me what you think. On my local machine I am
running PHP5 but I think the server is running PHP4.x

Shelly


>
> --
> Dave <dave@REMOVEbundook.com>
> (Remove REMOVE for email address)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация