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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.