|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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? |
|
#2
|
||||
|
||||
|
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. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > help on online diary php code |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|