Hi All,
I can't understand why I am getting The following error message: check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

I've poured through my code and I can't find a solution to the issue. Any suggestions from the pros??

Thanks in advance!

<?php
 include "db.inc";
  mysql_select_db("luzofishinggear");
  $b1 = $_REQUEST['b1'];
  $b2 = $_REQUEST['b2'];
  $b3 = $_REQUEST['b3'];
  $b4 = $_REQUEST['b4'];
  $b5 = $_REQUEST['b5'];
  $b6 = $_REQUEST['b6'];
  $b7 = $_REQUEST['b7'];
  $b8 = $_REQUEST['b8']; 
  $b9 = $_REQUEST['b9'];
  $b10 = $_REQUEST['b10'];
  $b11 = $_REQUEST['b11'];
  $b12 = $_REQUEST['b12'];
  $b13 = $_REQUEST['b13'];
  $b14 = $_REQUEST['b14'];
  $b15 = $_REQUEST['b15'];

$sql = "INSERT INTO boots VALUES ('$b1', '$b2', '$b3', '$b4', '$b5', '$b6', '$b7', '$b8', '$b9', '$b10', '$b11', '$b12', '$b13', '$b14', '$b15', )";
$result= mysql_query($sql,$link) or die(mysql_error());
header( "Location: http://www.studiocband.com" );
?>

Recommended Answers

All 3 Replies

You have a comma after the '$b15' entry that shouldn't be there.

hi
i think the problem is with ur insert statement
u didnt include what entities in the table to u want these values to go to eg:

$sql="INSERT INTO students (id_no,first_name,last_name,password,entry_year)
						VALUES
						('$id','$firstname','$lastname','$password','$entry')";

Thank you for your assistance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.