Jump to content

Unknown Parse error in code


Jurik

Recommended Posts

Hey guys was wondering if you could help me again, I have been helped out with a peice of code but when it come to running it in IE I get a parse error, I always thought parse errors occurered because a , or { was missing but ive checked my code and none of these are missing can u help me find the parse error? Heres the code it reporting that the parse error is on the line where the while statement starts, if I put a ; at the end of it tho the error moves up a line, any ideas?

[code=php:0]<?php

if (isset($_GET['ID'])) {
  $vidID = $_GET['ID'];
} else {
  $vidID = NULL;
}
$query = "SELECT * FROM videos WHERE ID = ('$vidID')";
$result=mysql_query($query);
while($row=mysql_fetch_array($result)
{
  extract($row);
  unlink($Videofile);
}

$query2 = "DELETE FROM videos WHERE ID = ('$vidID')";
$result2 = mysql_query($query2);


echo "The video has been deleted.";

?>[/code]
Link to comment
https://forums.phpfreaks.com/topic/23832-unknown-parse-error-in-code/
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.