cyberspace
Technical User
Hi, having an irritating problem with this simple code:
<?php
include("../config.php");
$sql = "INSERT INTO users VALUES ('', '$username', '$password', 'forename', 'surname', 'email', 'local_ip', 'user_type',)";
$result = mysql_query ( $sql ) or die ( mysql_error ( ) );
header ("Location: confirmuseradded.html");
?>
every time i try to submit a new user, i get the message "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1"
I've tried changing all sorts round there, including removing the include and manually typing the connection/db info...but still the same error!
Can anybody see what i'm missing? PC is near to going out of the window!
Thanks
'When all else fails.......read the manual'
<?php
include("../config.php");
$sql = "INSERT INTO users VALUES ('', '$username', '$password', 'forename', 'surname', 'email', 'local_ip', 'user_type',)";
$result = mysql_query ( $sql ) or die ( mysql_error ( ) );
header ("Location: confirmuseradded.html");
?>
every time i try to submit a new user, i get the message "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1"
I've tried changing all sorts round there, including removing the include and manually typing the connection/db info...but still the same error!
Can anybody see what i'm missing? PC is near to going out of the window!
Thanks
'When all else fails.......read the manual'