What i am doing is displaying a list of admins from a database:
Code: Select all
<?
mysql_connect("localhost","","");
mysql_select_db("");
$a=mysql_query("select * from members order by id");
echo "<table width=30% bgcolor=#EFEFEF align=center border=1 bordercolor=black>\n";
while($admin=mysql_fetch_array($a)){
echo "<tr align=center>\n";
echo "<td align=left><font size=1><strong>ID</strong>";
echo "<td align=left><font size=1><strong>Name</strong>";
echo "<td align=left><font size=1><strong>Username</strong>";
echo "<td align=left><font size=1><strong>Email</strong>";
echo "<td align=left><font size=1><strong>Delete?</strong>";
echo "</tr>";
echo "<tr align=center>\n";
echo "<td align=left><font size=1><br>$adminїid]";
echo "<td align=left><font size=1><br>$adminїname]";
echo "<td align=left><font size=1><br>$adminїlogin]";
echo "<td align=left><font size=1><br><a href=mailto:$adminїemail]>$adminїemail]</a>";
echo "<td align=left><font size=1>
<form action=administration.php method=post>
<input type=hidden value=$adminїid]>
<input name=Delete type=submit value=Delete>
</form>";
}
?>Back to the main problem..
Code: Select all
<?
if ($Delete) {
$db=mysql_connect("localhost","") or die ("cant connect");
mysql_select_db("",$db) or die ("cant change");
$result=mysql_query("delete from members where id='$adminїid]'") or die ("</tr></table><br><br>Deletion <b>NOT</b> Successful!");
while ($row=mysql_fetch_array($result)) {
if ($rowї"id"]==""]) {
printf("</tr></table><br><br>Successfully Deleted!");
}
}
}
?>Code: Select all
if ($rowї"id"]==""]) {Currently all the page displays is this:
46 is that line i highlighted btw...Parse error: parse error in C:\apache\htdocs\x\x\x.php on line 46
can anyone help me out here?