Jump to content


Photo

Unknown Parse error in code


  • Please log in to reply
2 replies to this topic

#1 Jurik

Jurik
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 13 October 2006 - 09:12 AM

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?

<?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.";

?>


#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 13 October 2006 - 09:15 AM

while($row=mysql_fetch_array($result)

Needs to be...

while($row=mysql_fetch_array($result))


#3 Jurik

Jurik
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 13 October 2006 - 09:25 AM

Oh I see, didn't no I needed a ) thank you very much




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users