jesushax Posted March 11, 2008 Share Posted March 11, 2008 below is my code <?php include($_SERVER['DOCUMENT_ROOT'] . '/includes/header-logged.php'); include($_SERVER['DOCUMENT_ROOT'] . '/includes/admin_access.inc'); switch(@$_GET["action"]) { Case "delete": $DelID = ($_GET["ID"]; mysql_query("Delete From tblUsers Where md5(UserID)='".$DelID."' "); header("Location: /admin/companies/view_companies.php"); break; default: $sql = mysql_query("SELECT * FROM tblUsers WHERE UserAdmin=\"0\" ORDER BY UserCompanyName") or die(mysql_error()); include($_SERVER['DOCUMENT_ROOT'] . '/includes/nav/companies.inc'); echo "<p>Click Username to edit profile, CompanyName to view/edit all company realted info, email to email direct and login reports to view users log in info.</p>"; echo '<table width="100%" cellpadding="2px"><tr style="font-weight:bold;"><td>Username</td><td>Company</td><td>Email</td><td>Tel</td><td>Date Added</td><td>Login Reports</td><td> </td></tr>'; while ($rsView = mysql_fetch_array($sql)) { @$counter++; $background_color = ( $counter % 2 == 0 ) ? ('#D7D7D7') : ('#EEEEEE'); echo "<tr height='20' style=\"background-color:".$background_color.";\">"; echo "<td><a href=\"/admin/edit_user.php?ID=". md5 ($rsView["UserID"])."\">".$rsView["UserName"]."</a></td>"; echo "<td><a href=\"/admin/companies/edit_company.php?ID=". md5($rsView["UserID"])."\">".$rsView["UserCompanyName"]."</a></td>"; echo "<td><a href=\"mailto:".$rsView["UserEmail"]."\">".$rsView["UserEmail"]."</a></td>"; echo "<td>".$rsView["UserTel"]."</td>"; echo "<td>".$rsView["UserDateAdded"]."</td>"; echo "<td><a href=\"/admin/view_user_logs.php?ID=".$rsView["UserID"]."\">View</a></td>"; echo "<td><a href=\"/admin/companies/admin_view_companies.php?ID=". md5 ($rsView["UserID"])."&action=delete\">Delete this Company</a></td></tr>"; } echo "</table>"; break; } include($_SERVER['DOCUMENT_ROOT'] . '/includes/footer.php'); ?> and my error message Parse error: syntax error, unexpected ';' in /view_companies.php on line 8 i cant see anything wrong! :S Quote Link to comment Share on other sites More sharing options...
beebum Posted March 11, 2008 Share Posted March 11, 2008 $DelID = ($_GET["ID"]); You were missing the closing ")" Quote Link to comment Share on other sites More sharing options...
jesushax Posted March 11, 2008 Author Share Posted March 11, 2008 pap thankyou for noticing it Cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.