Syntax error

Hi there,
I can’t find where I made a mistake, for years…

$row = "INSERT INTO Student (Name, Surename, StudentID, Generation) VALUES ('$_POST[$student_data[0]]', '$_POST[$student_data[1]]', '$_POST[$student_data[2]]', '$_POST[$student_data[3]]')";

This is report: Parse error: syntax error, unexpected ‘[’, expecting ‘]’ in
Thanks in advance…

First how are you defining $student_data?
Second, put var_dump($_POST); in your code and see what PHP is receiving from your form.

Hmm… Maybe you should to replace $_POST[$student_data[N]] with $_POST[$student_data][N] ?