Code: Select all
<?
$id=$_GET['id'];
if ($id=="") {
die("No Layout Specified");
}
$username="perks";
$pass="*****-";
$database="perks_layouts";
$pass2=$_POST["pass2"];
mysql_connect(localhost,$username,$pass);
@mysql_select_db($database) or die("Unable to select database");
if($pass2=="asf") {
$query="DELETE FROM `layouts` WHERE `id` = `$id`";
mysql_query($query);
$result=mysql_query($query);
$num=mysql_numrows($result);
$i=0;
while ($i < $num) {
$code=mysql_result($result,$i,"code");
$image=mysql_result($result,$i,"image");
$date=mysql_result($result,$i,"date");
$name=mysql_result($result,$i,"name");
echo "Layout was deleted successfully!";
echo "<br><a href='index.php'>Back</a>";
mysql_close();
++$i;
}
if ($pass2 != "") {
if ($pass2 != "asf") {
echo "Incorrect Password";
}
}
echo "<br><form action='delete.php?id=$id' method='post'>";
echo "Password: <input type='password' name='pass2'><br>";
echo "<input type='submit' value='Delete'>";
echo "</form>";
?>Parse error: syntax error, unexpected $end in /home3/perks/public_html/delete.php on line 47
What I don't understand is that there is no $end in the whole document. Can someone please help me?