PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old May 28th, 2004, 05:09 AM
p3rhapsody p3rhapsody is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 1 p3rhapsody User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy help on online diary php code

any body knows what's wrong with below code? always get the error msg as:
Parse error: parse error, unexpected T_ECHO in C:\Shared\Webfolders\.....\savebook.php on line 24

the source code as below:

<?php

include("ConnectDB.php");





$link = mysql_connect($DB_HOST, $DB_USERNAME, $DB_PASSWORD);

mysql_select_db($DB_DATABASE, $link);





$content=$_REQUEST['content'];

$intime=$_REQUEST['intime'];

$rootid=0;

$face=$_REQUEST['face'];

$weather=$_REQUEST['weather'];

$expenseonfood=$_REQUEST['expenseonfood'];

$expenseontransport=$_REQUEST['expenseontransport'];

$expenseonaccommodation=$_REQUEST['expenseonaccommodation'];

$expenseonentertainment=$_REQUEST['expenseonentertainment'];

$activity=$_REQUEST['activity'];

$email=$_REQUEST['email'];

$strsql="INSERT INTO guestbook(content,intime,rootid,face,weather,expen seonfood, expenseontransport, expenseonaccommodation, expenseonentertainment, activity, email) values('$content', '$intime', '$rootid','$face','$weather','$expenseonfood', '$expenseontransport', '$expenseonaccommodation', '$expenseonentertainment', '$activity','$email')";

mysql_query($strsql, $link)

echo "<a href='preview.php'> Today's Diary </a>";

mysql_close($link);

?>


what's wrong with my echo sytax?

Reply With Quote
  #2  
Old May 28th, 2004, 06:55 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Try adding a semi-colon at the end of your mysql_query() line. Also, in the future, please wrap code in <code></code> or <PHP></PHP> tags (replace angle brackets with square brackets) to make it a little more readable. It also never hurts to mark which line is the problematic line by adding a comment to the effect of "//This is line 24."
__________________
Please don't PM me asking for solutions outside the scope of a thread.
Keeping all responses in a thread stands to help others who come along later,
which is after all what this forum's all about.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > help on online diary php code


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway