Can anyone spot an error in the PHP code I have written below? I can't. According to the server it's on line 8.
<?php
$link = mysql_connect( "localhost", "devilware", "w137641e" );
if ( ! link )
die( "Couldn't connect to mySQL database." );
mysql_select_db( "devilware", $link )
or die( "Error: ". mysql_error() );
if ( isset( $movie_name ) && isset( $pos_last_week ) && isset( $position )
{
$query = "UPDATE movie_chart set movie_name='$movie_name', pos_last_week='$pos_last_week' WHERE position='$position' ";
$result = mysql_query( $query, $link );
if( ! result )
die( "Couldn't update: ".mysql_error() );
print "<h1>Table updated ". mysql_affected_rows() ." row(s) changed</h1><p>";
}
?>