Hello everyone,

I have changed hosting my website. But at the time of connectivity to database , i have changed mysql_connect( ) parameters.
still i am facing some problem in opening website.
what can be problem . please suggest me.

thanks,
gagan

hello,
You can slove it by editing SQL commands :

Select * from tb_name

to :

Select filed1_name, filed2_name ....,  from tb_name

And the best thing to change the Scriot that you are using to another one using Cache, and convert the Database.

good Luck .

For starters the above code has absolutely nothing to do with troubleshooting a connection to your database server.

gagan22: Is your site throwing any php errors and/or any mysql connection errors?

if you're not getting any errors or are simply getting a blank page, I would create a separate file and try something like the following, to troubleshoot your connection issue.

<?php
error_reporting( E_ALL );

$link = mysql_connect("localhost", "mysql_user", "mysql_password") or die( mysql_error() );

mysql_select_db('foo', $link) or die( mysql_error() );

run that script but replacing the login information with your login details and the database name with your database name. If it works then the problem lies elsewhere. If that returns a php or mysql error then please post it back here and i'm sure everyone will be able to help you out once we see what is actually going on.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.