Wow, people like to do things their own way. But, Richei is right, not helping.
We can open a new thread discussion if someone should change to PDO or not.
(I am not in my site, not needed for what it does. There, added my 2 cents…)
So, to the problem we are discussing. First, when you move code to a new server, you must remember that this means a new system, perhaps Linux or Windows which might make a difference and of course the PHP system may not be the same version. Therefore, there could be a lot of differences in the system setups.
Next, in the query Rachael showed there is a function. Perhaps that function is inside a file that was not copied to the new server. There are many possible problems that can cause this error. You need to debug your pages a bit.
First, I would check the new server and make sure all of your files exist where they should be.
Next, I would send your page thru the W3-Validator to see if your page has lost some code or if it has some invalid coding that the newer server does not allow. ( it is here: http://validator.w3.org/ ) Just enter your address of the site…
Lastly, you showed this:
<? $query = mysql_query("SELECT * FROM link where linktype='bingo' and h1 ='".StripUrl101(ucwords($h1))."'"); { while($row =mysql_fetch_assoc($query)) extract($row);?>
Now, if it is a variable undefined, this it must be $h1 or the output of StripUrl101(). You should place this line just above the $query= line:
[php]
die("$h1=" . $h1 . "
ucwords($h1)=" . ucwords($h1) . "
StripUrl101()=" . StripUrl101(ucwords($h1))");
[/php]
What this will do is show if the data passed to the query is correct or not. If correct, then you have to display the output from the query with error checking added in. Your query system does not have error-checking in it. It simply queries without checking for errors. So, this query altered just a little would show you an error if it happens inside the query system itself. Something like:
[php]
$query = mysql_query("SELECT * FROM link where linktype='bingo' and h1 ='".StripUrl101(ucwords($h1))."'") or die(mysql_error());
[/php]
This is not the preferred way, but, it will die there and show the error for debugging purposes. Another better way would be to use an if-clause to check if "mysql_error()" is empty or not after the query. If so, then display an error message, if not, continue on to grab the $row of data.
So, debug your page a little and ask us further questions… Good luck…