Ibshas25 Posted November 1, 2010 Share Posted November 1, 2010 cant seemed to solve this... helppp <?php require_once( "common.inc.php" ); require_once( "config.php"); require_once("users.class.php"); $start = isset( $_GET["start"] ) ? (int)$_GET["start"] : 0; $order = isset( $_GET["order"] ) ? preg_replace( "/[^a-zA-Z]/", "", $_GET["order"] ) : "usr_username"; list( $users, $totalRows ) =users::getusers( $start, PAGE_SIZE, $order ); displayPageHeader( "View project Employees" ); ?> <h2> Displaying Available Project Employees <?php echo $start + 1 ?> - <?php echo min( $start + PAGE_SIZE, $totalRows ) ?> of <?php echo $totalRows ?></h2> <table cellspacing="0" style="width: 30em; border: 1px solid #667;"> <tr> <th><?php if ( $order != " usr_username" ) { ?><a href="view_users.php? order= usr_username"><?php } ?>Username<?php if ( $order != "usr_username") { ?></a><?php } ?></th> <th><?php if ( $order != "usr_name" ) { ?><a href= "view_users.php? order= usr_name"> <?php } ?>First name<?php if ( $order != "usr_name" ) { ?></a><?php } ?></th> <th><?php if ( $order != "usr_surname" ) { ?><a href= "view_users.php? order= usr_surname"> <?php } ?>Last name<?php if ( $order != "usr_surname" ) { ?></a><?php } ?></th> </tr> <?php $rowCount= 0; foreach ( $users as $users ) { $rowCount++; ?> <tr<?php if ( $rowCount % 2 == 0 ) echo ' class="alt"' ?>> <td><a href="view_user.php?userid=<?php echo $user-> getValueEncoded ( "id" ) ?><?php echo $user->getValueEncoded( "usr_username" ) ?></a></td> <td><?php echo $user->getValueEncoded( "usr_name" ) ?></td> <td><?php echo $user->getValueEncoded( "usr_surname") ?> </td> </tr> <?php } ?> </table> <div style="width: 30em; margin-top: 20px; text-align; center;"> <?php if ( $start > 0 ) { ?> <a href="view_users.php?start=<?php echo max( $start - PAGE_SIZE, 0 )?> &order=<?php echo $order ?>">Previous Page</a> <?php if ( $start + PAGE_SIZE < $totalRows ) { ?> <a href="view_users.php?start=<?php echo min( $start + PAGE_SIZE, $totalRows ) ?>& order=<?php echo $order ?>">Next Page</a> <?php displayPageFooter(); ?> MOD EDIT: . . . tags added. Link to comment https://forums.phpfreaks.com/topic/217471-parse-error-syntax-error-unexpected-end-in-exportsoi-50studentsm20/ Share on other sites More sharing options...
rascle Posted November 1, 2010 Share Posted November 1, 2010 I dont know if it is the problem, but at the end of the code u state " <?php if ( $start + PAGE_SIZE < $totalRows ) { ?>" Yet I cant see a close }??? Link to comment https://forums.phpfreaks.com/topic/217471-parse-error-syntax-error-unexpected-end-in-exportsoi-50studentsm20/#findComment-1129054 Share on other sites More sharing options...
Andy-H Posted November 1, 2010 Share Posted November 1, 2010 <?php require_once( "common.inc.php" ); require_once( "config.php"); require_once("users.class.php"); $start = isset( $_GET["start"] ) ? (int)$_GET["start"] : 0; $order = isset( $_GET["order"] ) ? preg_replace( "/[^a-zA-Z]/", "", $_GET["order"] ) : "usr_username"; list( $users, $totalRows ) =users::getusers( $start, PAGE_SIZE, $order ); displayPageHeader( "View project Employees" ); ?> <h2> Displaying Available Project Employees <?php echo $start + 1 ?> - <?php echo min( $start + PAGE_SIZE, $totalRows ) ?> of <?php echo $totalRows ?></h2> <table cellspacing="0" style="width: 30em; border: 1px solid #667;"> <tr> <th><?php if ( $order != " usr_username" ) { ?><a href="view_users.php? order= usr_username"><?php } ?>Username<?php if ( $order != "usr_username") { ?></a><?php } ?></th> <th><?php if ( $order != "usr_name" ) { ?><a href= "view_users.php? order= usr_name"> <?php } ?>First name<?php if ( $order != "usr_name" ) { ?></a><?php } ?></th> <th><?php if ( $order != "usr_surname" ) { ?><a href= "view_users.php? order= usr_surname"> <?php } ?>Last name<?php if ( $order != "usr_surname" ) { ?></a><?php } ?></th> </tr> <?php $rowCount= 0; foreach ( $users as $users ) { $rowCount++; ?> <tr<?php if ( $rowCount % 2 == 0 ) echo ' class="alt"' ?>> <td><a href="view_user.php?userid=<?php echo $user-> getValueEncoded ( "id" ) ?><?php echo $user->getValueEncoded( "usr_username" ) ?></a></td> <td><?php echo $user->getValueEncoded( "usr_name" ) ?></td> <td><?php echo $user->getValueEncoded( "usr_surname") ?> </td> </tr> <?php } ?> </table> <div style="width: 30em; margin-top: 20px; text-align; center;"> <?php if ( $start > 0 ) { ?> <a href="view_users.php?start=<?php echo max( $start - PAGE_SIZE, 0 )?> &order=<?php echo $order ?>">Previous Page</a> <?php } if ( $start + PAGE_SIZE < $totalRows ) { ?> <a href="view_users.php?start=<?php echo min( $start + PAGE_SIZE, $totalRows ) ?>& order=<?php echo $order ?>">Next Page</a> <?php displayPageFooter(); } ?> Link to comment https://forums.phpfreaks.com/topic/217471-parse-error-syntax-error-unexpected-end-in-exportsoi-50studentsm20/#findComment-1129055 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.