To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Tools > Dreamweaver

Dreamweaver In need of help with Dreamweaver?

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-08-2003, 10:37 PM   #1
alh
Junior Member
 
Join Date: Oct 2003
Posts: 4
Angry php error message

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']); ?>
alh is offline   Reply With Quote
Old 12-09-2003, 08:43 AM   #2
olaf
Senior Member
 
olaf's Avatar
 
Join Date: Jun 2003
Location: Netherlands
Posts: 585
How do you created the table, in phpmyadmin? Is the user the same like in the app. before? Works the script if you test it on your localserver?
__________________
Later!
Olaf

Dutch PHP resource|Web Development Blog
olaf is offline   Reply With Quote
Old 12-09-2003, 09:55 AM   #3
alh
Junior Member
 
Join Date: Oct 2003
Posts: 4
thanks for responding...

yes, I created the table in phpMyAdmin. I am testing it on my local IIS server which works fine with other sites. as I also said, I can look at the table in the recordset setup in Dreamweaver and the data is there.

very perplexing...
alh is offline   Reply With Quote
Old 12-09-2003, 04:17 PM   #4
olaf
Senior Member
 
olaf's Avatar
 
Join Date: Jun 2003
Location: Netherlands
Posts: 585
I don't know what's the problem exactly, but search the machromedia forum there are some guys with same problem...
__________________
Later!
Olaf

Dutch PHP resource|Web Development Blog
olaf is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 06:06 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.