sprdthword Posted January 26, 2008 Share Posted January 26, 2008 Can anyone help me firgure out why I am getting the following parse error: Parse error: parse error, unexpected '\"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/html/calendar.php on line 44 When I run the code through PHPDesigner 2005 I get the following error: Line 44 Parse error parse error, unexpected "",expecting T_STRING or T_VARIABLE or T_NUM_STRING in ... As near as I can tell, line 44 seems to be where I am assigning the variables but that seems right so any help figuring this out will be greatly appreciated. Here is the entire page code: <HTML> <HEAD> <TITLE>Community Bible Church - contact us</TITLE> <LINK REL="stylesheet" HREF="style.css" TYPE="text/css"> <META NAME="keywords" CONTENT="Community,Bible,Church,Bethlehem,Georgia,Evangelical,Nondenominational,Non-denominational,Ministry,Christian,Bible,Young,Youth,Teenager,Help,Jesus,God"> <META NAME="description" CONTENT="Community Bible Church of Bethlehem Georgia"> <META NAME="robots" CONTENT="FOLLOW,INDEX"> </HEAD> <BODY> <?php include 'banner.php'; ?> <TABLE WIDTH=100%> <TR><TD> </TD></TR> <TR><TD> </TD></TR> <TR><TD<b>Click on an event for more details</b></TD></TR> <TR><TD width = 70%> <iframe src="http://www.google.com/calendar/embed?height=600&wkst=1&bgcolor=%23cc9933&src=clr61bboutsn6173mh2q3g1qt4%40group.calendar.google.com&color=%238D6F47&ctz=America%2FNew_York" style=" border-width:0 " width="800" height="600" frameborder="0" scrolling="no"></iframe> </TD> <TD width = 30%> <?php //Create table within table echo '<Table>','<TR>'; // Include Database details include 'db_data_memverses.php'; // open a connection to the database $connection = mysql_connect($server, $user, $pass); // formulate the SQL query $query = "SELECT * FROM memverses WHERE begdate >= now() AND enddate = begdate + 6; // run the query on the database $result = mysql_db_query($db,$query,$connection); // if result, loop through dates if(mysql_num_rows($result) > 0) { // get the list of verses $counter = 0; while ($row = mysql_fetch_array($result)) { $begdate = $row["begdate"]; $trans = $row["translation"]; $reference = $row["reference"]; $verse = $row["verse"]; echo '<TD><center>Memory Verse for week of ',$begdate,'<br>Translation',$trans,'</center><br>',$reference,' ',$verse; $counter = $counter + 1; if ($counter >1) { echo '</TR><TR>'; $counter = 0; } } } echo '</Table>'; ?> </TD> </TR> </TABLE> </BODY> </HTML> Quote Link to comment Share on other sites More sharing options...
Nhoj Posted January 26, 2008 Share Posted January 26, 2008 $query = "SELECT * FROM memverses WHERE begdate >= now() AND enddate = begdate + 6; Has no ending quote... Quote Link to comment Share on other sites More sharing options...
shamsuljewel Posted January 26, 2008 Share Posted January 26, 2008 // formulate the SQL query $query = "SELECT * FROM memverses WHERE begdate >= now() AND enddate = begdate + 6; please add an " at the end of the query. Quote Link to comment Share on other sites More sharing options...
sprdthword Posted January 26, 2008 Author Share Posted January 26, 2008 Duh!! I knew it had to be some simple stupid error - I just didn't realize it would be that stupid Thanks for the quick help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.