when did it go wrong?
has it worked on the new server?
has the db server chanegd as well as the web server, if so have you changed the data server hostname,userid & password.
if it has run fine on the new server then I'd expect you have a corrupt script
if it has't then I'd expect the proble, to be that you haven't localised the script for the new server(s).
so because you haven't supplied the details n the script, ie the section that is going wrong. usually contributors hee wold expect to see the few lines (NOT the whole script) of code leading up to the error... you don't need to (and shouldn't) procide serverid(hostname), userid & passwords.. thats a security breach which could lead to your system being compromised, nor should you provide access to your server through ftp or any other mechanism.. thats a security breach.
I'd suggest you put an OR DIE statement after each mysql operation and see where the script is actually dieing. becuase of the nature of PHP its quite possibel tht the error you are seeing is not actaully on the line nmber reported.. the fault is upstream of that.
the syntax I use for error handling is
or die($Module,"E:10350 - Failed to open cnn: ".mysql_errno().": ".mysql_error());
where $Module tells me which script is reporting the error
the E:xxxxx is an error number and message generated by me and specific to the error.... eg this error message tells me I was attempting to open a conection
the mysql_errno() & mysql_error() repeat the error message from MySQL
if the MySQL command is a SQL select or update then I also repeat the SQL that failed to check that the SQL that failed is what Im expecting to have sent.
so over to you
check the hostname, userid & password first.. put an or die after the opening of the connection
put an or die after the selection of the db
put an or die after each and every select statement
One word of caution though, although this site does help beginners (we all have to start somewhere, its not a mechanism for you to learn form scratch PHP / MySQL development). Its unlikely you will find someone able to hold your hand through the whole process.. you will have to learn by doing. try W3 schools. .they are a pretty good learnign resource, the PHP.NET site is a pretty good reference (although as useful for beginners, its great for those who know what the want to do but don't know the minutae of PHP). And don't overestimate the value of a good PHP book (try a 'bible' book form Wiley)