|
Posted by BearItAll on 05/24/05 15:33
On Mon, 23 May 2005 17:27:28 -0700, sonobeppo wrote:
> Hi all,
>
> Hope someone can help, as I'm fumbling towards understanding PHP.
>
> $dbcnx = @mysql_connect('localhost', 'my_username', 'my_userpassword');
>
> This works well when I preview the page on the local server, but can
> anyone tell me how to load this to my Web site, and what I should be
> entering instead of 'localhost'? I get the 'else' message I inserted, so
> it appears to me that the 'mysql_connect' function is the problem. What am
> I supposed to use instead of 'localhost'?
>
> Thanks very much.
>
> Joe
Have you actually set up your mysql on your ISP's site, with users
/database? What you are likely to find is that they have set up your main
user name as a root to your MySQL, then you add some limited users to use
in your code.
Or, if you would prefer to use your local database, then do you
have a public IP that can be used. For example,
$dbcnx = @mysql_connect('https://myhomeip', 'my_username',
'my_userpassword');
Navigation:
[Reply to this message]
|