Jump to content

cant see error


jesushax

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/95598-cant-see-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.