Ibshas25 Posted November 2, 2010 Share Posted November 2, 2010 can't seem to find the error. helppp Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /export/SOI-50/students/m2009/abhr428/web/WebIbs/view_user.php on line 20 <?php require_once( "common.inc.php"); require_once( "config.php" ); require_once( "users.class.php" ); require_once( "LogEntry.class.php" ); $userid = isset( $_GET["userid"] ) ? (int)$_GET["userid"] : 0; if ( !$user = user::getuser( $userid) ) { displayPageHeader( "Error" ); echo "<div>User not found.</div>; displayPageFooter(); exit; } $logEntries = LogEntry::getLogEntries( $userid ); displayPageHeader( "View user: ". $user->getValueEncoded( "usr_name") ." ". $user->getValueEncoded( "usr_surname") ); ?> <dl style="width: 30em;"> <dt>Username</dt> <dd><?php echo $user->getValueEncoded( "usr_username" ) ?></dd> <dt>First name</dt> <dd><?php echo $user->getValueEncoded( "usr_name" ) ?></dd> <dt> Last name</dt> <dd><?php echo $user->getValueEncoded( "usr_surename" ) ?></dd> <dt>Joined on</dt> <dd><?php echo $user->getValueEncoded( "usr_recordtime") ?></dd> <dt>Last time active</dt> <dd><?php echo $user->getValueEncoded( "usr_lastlogintime" ) ?></dd> </dl> <h2> Access Log </h2> <table cellspacing="0" style="width":30em; border: 1px solid #667;"> <tr> <th>Web Page</th> <th>Number of visits</th> <th> Last visit</th> </tr> <?php $rowCount = 0; foreach ~( $logEntries as $logEntry ) { $rowCount++; ?> <tr<?php if ( $rowCount % 2 == 0 ) echo ' class="alt"' ?>> <td><?php echo $logEntry->getValueEncoded( "pageUrl" ) ?></td> <td><?php echo $logEntry->getValueEncoded( "numVisits") ?></td> <td><?php echo $logEntry->getValueEncoded( "lastAccess") ?> </td> </tr> <?php </table> <div style="width: 30em; margin-top: 20px; text-align: center;"> <a href="javascript:history.go(-1)">back</a> </div> <?php displayPageFooter(); ?> Link to comment https://forums.phpfreaks.com/topic/217549-parse-error-syntax-error-unexpected-t_string-expecting-or-in-export/ Share on other sites More sharing options...
anups Posted November 2, 2010 Share Posted November 2, 2010 replace echo "<div>User not found.</div>; by echo "<div>User not found.</div>"; Link to comment https://forums.phpfreaks.com/topic/217549-parse-error-syntax-error-unexpected-t_string-expecting-or-in-export/#findComment-1129360 Share on other sites More sharing options...
revraz Posted November 2, 2010 Share Posted November 2, 2010 You would've seen the error if you used Code Tags in your post. Link to comment https://forums.phpfreaks.com/topic/217549-parse-error-syntax-error-unexpected-t_string-expecting-or-in-export/#findComment-1129363 Share on other sites More sharing options...
Ibshas25 Posted November 2, 2010 Author Share Posted November 2, 2010 cheers thank you Link to comment https://forums.phpfreaks.com/topic/217549-parse-error-syntax-error-unexpected-t_string-expecting-or-in-export/#findComment-1129365 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.