$connection = mysql_connect($host,$user,$password)
or die ("Couldn't connect to server.");
$db = mysql_select_db("$dbname",$connection)
or die ("Couldn't select the $dbname database.");

Define your variables above, for $host, $user, $password, and $dbname 
properly.  I have run into hosts where "localhost" doesn't work.

As a matter of fact, I think it's Yahoo hosting that required "mysql" 
as the host name.  


--- In [email protected], arunmohan kamalakannan 
<[EMAIL PROTECTED]> wrote:
>
> Dear Gupta,
>           use mysql_select_db($database_name);
> and the use mysql_query function and all to fetch
> datas. If you still not get properly check and start
> mysql.
> 
> With regards,
> Arun
> --- achin gupta <[EMAIL PROTECTED]> wrote:
> 
> 
> ---------------------------------
> this is achin gupta  from new delhi.
> I m working as  a software delveloper.
> I m new developer in field of PHP & mysql.
> 
> I have made a database in mysql & want to access it
> using PHP. but its not connecting.
> I m giving localhost name, user name & password
> but still its not connecting.
> Where problem may lie?
> 
> with regards
> achin gupta
> 
> 
>             
> __________________________________ 
> Start your day with Yahoo! - Make it your home page! 
> http://www.yahoo.com/r/hs
> 
> 
> 
> 
> Community email addresses:
>   Post message: [email protected]
>   Subscribe:    [EMAIL PROTECTED]
>   Unsubscribe:  [EMAIL PROTECTED]
>   List owner:   [EMAIL PROTECTED]
> 
> Shortcut URL to this page:
>   http://groups.yahoo.com/group/php-list
> 
>       
> 
>       SPONSORED LINKS  
>                                                 Php
> mysql                                    Job postings 
>                                      
>     
> ---------------------------------
>   YAHOO! GROUPS LINKS
> 
>   
>     Visit your group "php-list" on the web.
>    
>     To unsubscribe from this group, send an email to:
>  [EMAIL PROTECTED]
>    
>     Your use of Yahoo! Groups is subject to the Yahoo!
> Terms of Service.
> 
>   
> ---------------------------------
> 
> 
> 
> 
> 
>               
> __________________________________________________________ 
> Yahoo! India Matrimony: Find your partner now. Go to 
http://yahoo.shaadi.com
>








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/HKFolB/TM
--------------------------------------------------------------------~-> 

Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to