jasraj Posted August 10, 2009 Share Posted August 10, 2009 I keep getting an error say, Parse error: syntax error, unexpected '}' in /home/gj719/public_html/gigbookers/account/list.php on line 8 <?php session_start(); include('../library/connectdb.php'); include('../library/selectdb.php'); if ($_SESSION['admin_logged_in']!=true){ header('Location: ../login/login.php'); exit; } $result = "SELECT * FROM gblogin_user WHERE gblogin_id = {$_GET['id']}"; $result = mysql_query( $result ) or die ( mysql_error() ); while($row = mysql_fetch_assoc($result)) { $table.= ' <tr> <td>'.$row['username'].'</td> <td>'.$row['userpassword'].'</td> <td>'.$row['email'].'</td> <td><a href = "details.php?id='.$row['gblogin_id'].'" >Details</a></td> <td><a href = "update.php?id='.$row['gblogin_id'].'" >Edit</a></td> </tr>3 '; } ?> Link to comment https://forums.phpfreaks.com/topic/169672-help-i-keep-getting-this-error-unexpected/ Share on other sites More sharing options...
GingerRobot Posted August 10, 2009 Share Posted August 10, 2009 Did you copy and paste your code exactly? I do not get that syntax error if I try and run your code. Link to comment https://forums.phpfreaks.com/topic/169672-help-i-keep-getting-this-error-unexpected/#findComment-895107 Share on other sites More sharing options...
jasraj Posted August 10, 2009 Author Share Posted August 10, 2009 Yep, i copied and paste exactly, i cant seem to understand why this error keeps coming up... Link to comment https://forums.phpfreaks.com/topic/169672-help-i-keep-getting-this-error-unexpected/#findComment-895116 Share on other sites More sharing options...
jasraj Posted August 10, 2009 Author Share Posted August 10, 2009 still not fixed here's my full code please help <?php session_start(); include('../library/connectdb.php'); include('../library/selectdb.php'); if ($_SESSION['admin_logged_in']!=true){ header('Location: ../login/login.php'); exit; } $result = "SELECT * FROM gb_login WHERE gblogin_id = {$_GET['id']}"; $result = mysql_query( $result ) or die ( mysql_error() ); while($row = mysql_fetch_assoc($result)) { $table.= ' <tr> <td>'.$row['username'].'</td> <td>'.$row['userpassword'].'</td> <td>'.$row['email'].'</td> <td><a href = "details.php?id='.$row['gblogin_id'].'" >Details</a></td> <td><a href = "update.php?id='.$row['gblogin_id'].'" >Edit</a></td> </tr> '; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Gig Bookers</title> <link rel="stylesheet" type="text/css" href="../library/style.css"/> </head> <body> <div id="wrap"> <div id="header"> <h1><a href="#">Gig Bookers Admin</a></h1> <h2>Online Event Ticket Booking</h2> </div> <!-- End Header --> <div id="top"></div><!-- End Top --> <div id="menu"> <?php include("../admin/naviagation.php") ?> </div> <!-- End Menu --> <div id="content"> <div class="left"> <table> <tr> <th>username:</th> <th>Userpassword:</th> <th>email:</th> <tr> <?=$table?> </table> </div> <!-- End Left --> <div class="right"> <?php include("../admin/rightside.php") ?> </div> <!-- End Right --> <div style="clear: both;"></div><!-- End Clear --> </div> <!-- End --> <div id="bottom"></div> <!-- End Bottem --> <div id="footer"> <p>Designed by Jasraj Gill</p> </div> <!-- End Footer --> </div> <!-- End Wrap / All Div Tags --> </body> </html> Link to comment https://forums.phpfreaks.com/topic/169672-help-i-keep-getting-this-error-unexpected/#findComment-895131 Share on other sites More sharing options...
phpSensei Posted August 10, 2009 Share Posted August 10, 2009 your problem is one of these files include('../library/connectdb.php'); include('../library/selectdb.php'); Link to comment https://forums.phpfreaks.com/topic/169672-help-i-keep-getting-this-error-unexpected/#findComment-895132 Share on other sites More sharing options...
jasraj Posted August 10, 2009 Author Share Posted August 10, 2009 but these files work just fine on everyother page there is nothing wrong with them there... Link to comment https://forums.phpfreaks.com/topic/169672-help-i-keep-getting-this-error-unexpected/#findComment-895135 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.