[07-Apr-2005 15:49:06] PHP Parse error: syntax error, unexpected $end in Admin.php on line 94
Ummm... My script ends @ line 93?!?!😕
... I have opened my script in notepad and PHP Designer 2005 and they dont have anything past line 93...? Could another error be generating this.... ?
Here is my script... ya its probably not very logical, but I'm new and it works... (well it did until now ... 🙁)
<? include 'includes/Header.php';
if ($AccessLevel != "full") {
header( "Location: main.php" );
exit();
}
?>
<div id="content">
<center>
<h1>Administration Console</h1>
<h2>Users</h2>
<!--Get users-->
<span>
<table cellspacing="0" cellpadding="3" border="0">
<tr>
<td>Id Number</td>
<td>User Name</td>
<td>Password</td>
<td>Company</td>
<td>Access Level</td>
<td>Edit</td>
<td>Delete</td>
</tr>
</span>
<?php
mysql_select_db("$dbDatabase", $db) or die ("Couldn't select the database.");
$query="SELECT * FROM users";
$result=mysql_query($query);
$num=mysql_numrows($result);
$i=0;
while ($i < $num) {
$id=mysql_result($result,$i,"user_id");
$username=mysql_result($result,$i,"username");
$password=mysql_result($result,$i,"password");
$company=mysql_result($result,$i,"Company");
$UserAccess=mysql_result($result,$i,"AccessLevel");
Echo ' <tr>';
Echo ' <td>';
Echo $id;
Echo '</td>';
Echo ' <td>';
Echo $username;
Echo '</td>';
Echo ' <td>';
Echo $password;
Echo '</td>';
Echo ' <td>';
Echo $company;
Echo '</td>';
Echo ' <td>';
Echo $UserAccess;
Echo '</td>';
Echo ' <td>';
Echo '<A href="Admin/EditUser?=';
Echo $id;
Echo '"><img src="Graphics/Modify.Gif" border="0"></a>';
Echo '</td>';
Echo ' <td>';
Echo '<A href="Admin/DeleteUser?=';
Echo $id;
Echo '"><img src="Graphics/Delete.Gif" border="0"></a>';
Echo ' </tr>';
$i++;
}
?>
<form method="POST" action="admin.php">
<tr>
<td>-</td>
<td><input type="text" name="CreateUser" size="20"></td>
<td><input type="text" name="CreatePass" size="20"></td>
<td><select name="company" size=1>
<?php
mysql_select_db("$dbDatabase", $db) or die ("Couldn't select the database.");
$newquery="SELECT * FROM company";
$newresult=mysql_query($newquery);
$newnum=mysql_numrows($newresult);
$a=0;
while ($a < $newnum) {
$addcompany=mysql_result($newresult,$a,"company");
echo '<option value="';
echo $addcompany;
echo '">';
echo $addcompany;
echo '</option>';
?>
<td>Access Level</td>
<td>-</td>
<td>-</td>
</tr>
</div>
</center>
</body></html>
If i have already defined $num and i define it again will it take the latest definition?