Missing field ' . $i + 1 . '.'; } $form[$i] = clean($_POST['form'][$i]); } if(!is_numeric($form[2])) { $error = $error . '' . $form[2] . ' is not a number.'; } elseif($form[2] > 10) { $form[2] = 10; } else { $form[2] = abs($form[2]); } if(!$error) { mysql_query("INSERT INTO `comments` (`gameid`, `author`, `authorid`, `comment`, `rating`) VALUE ('{$game['id']}', '$user', '{$info['id']}', '$form[1]', '$form[2]')"); $error = 'Your comment has been added.'; } } $main = $main . '' . $error . ' '; include('footer.php'); ?>
Add comment for ' . $game['name'] . '
Your name:
Comment:
Rating: / 10