I have been using Dreamweaver MX for a while to create dynamic sites. I am on OSX and have a Windows 2000 server locally with mySQL installed as well as PHP. both work perfectly fine with other sites I have done and maintain regularly.
I have a new site that I just created. it is set up the same as the other sites I have done. I want to use dynamic text in a single place in the site. I created the database connection and it connects fine. I create and test a recordset. that works fine. I can query and see the data in the table. when I use Live Data View, or test it on my server, I get the following error message
Parse error: parse error, unexpected T_STRING in E:\Development\SoundResort\public\update_pick_7x17nple7r.php on line 2.
of course that file really doesn't exist, since it's a temporary file. that said, I assume that the error isn't in my main file, but in the Connection file since it is read in in the require_once statement. normally something like this is caused by missing quotes or the like. I don't see that problem here. in addition this code was created by Dreamweaver, not by me. and virtually the same code works perfectly in my other project.
any suggestions would definitely be appreciated.
rockclimber
the Connection file (Connections\mysqlSoundResort.php)looks as follows:
<?php
FileName="Connection_php_mysql.htm"
Type="MYSQL"
HTTP="true"
$hostname_mysqlSoundResort = "localhost";
$database_mysqlSoundResort = "stuff_soundresort_com";
$username_mysqlSoundResort = "dbm.sound.com";
$password_mysqlSoundResort = "troser54";
$mysqlSoundResort = mysql_pconnect($hostname_mysqlSoundResort, $username_mysqlSoundResort, $password_mysqlSoundResort) or trigger_error(mysql_error(),E_USER_ERROR);
?>
the php stuff that Dreamweaver installs in the top of my update_pick.php file is
<?php require_once('Connections/mysqlSoundResort.php'); ?>
<?php
mysql_select_db($database_mysqlSoundResort, $mysqlSoundResort);
$query_rs_ChrisPick = "SELECT picks.chris_pick FROM picks";
$rs_ChrisPick = mysql_query($query_rs_ChrisPick, $mysqlSoundResort) or die(mysql_error());
$row_rs_ChrisPick = mysql_fetch_assoc($rs_ChrisPick);
$totalRows_rs_ChrisPick = mysql_num_rows($rs_ChrisPick);
?>
and the php I am using to display the dynamic text is simply
<?php echo trim($row_rs_ChrisPick['chris_pick']); ?>