Jump to content

Archived

This topic is now archived and is closed to further replies.

Jurik

Unknown Parse error in code

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]

Share this post


Link to post
Share on other sites
[code=php:0]
while($row=mysql_fetch_array($result)
[/code]

Needs to be...

[code=php:0]
while($row=mysql_fetch_array($result))
[/code]

Share this post


Link to post
Share on other sites

×

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.