Pages not connecting to MySQL database
I programmed some web pages on my Mac OS X (10.5.8) using Dreamweaver CS4 and MAMP. Now I've uploaded them to a host (FatCow) and transferred my MySQL database to the same host, but I can't get them to connect, so the body of the page shows up, but things like #story_head# show up like that instead of being replaced with information from the database.
The host has a MySQL code generator from which I got this PHP string (Python and Perl are the other generator choices) and put it in my root folder in a file called "connect.php":
<?php
$link = mysql_connect('burwelltribunecom.fatcowmysql.com', 'megan', 'password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_select_db(burwelltribune);
?> "connect.php" works when I open it separately, but the .cfm pages still aren't connecting to it.
Host support says it's a coding issue on my end, so my question is where should I put that PHP string or do I need different code to connect to the database in the .cfm pages?
Here's one of the pages: http://burwelltrib.com/TRIBUNESITE/tribuneindex.cfm
This is the code I used to connect to the database when it was on my local computer, and that's still what's in there:
<!---Datasource--->
<CFSET DataSource="burwelltribune">
<CFQUERY name="DisplayNewsStories" datasource="#DataSource#">
SELECT *
FROM stories
</CFQUERY>
<CFQUERY name="DisplaySportsStory" datasource="#DataSource#">
SELECT *
FROM stories
</CFQUERY>
<CFQUERY name="DisplayWeather" datasource="#DataSource#">
SELECT *
FROM weatherreport
</CFQUERY>
Thanks!
