in a php file that use this line of code to insert some text in the table TABONE
mysql_query("INSERT INTO `TABONE` VALUES ('$q1', '$q2', '$q3', '$q4', '$q5')") ;
the code work fine because "we receive 5 variables and this table contain 5 columns"
but sometimes we receive 5 variables for a table that contain only 3 columns and in this case we just want to insert the first 3 variables ('$q1', '$q2', '$q3')in the 3 columns.
in this case
mysql_query("INSERT INTO `TABONE` VALUES ('$q1', '$q2', '$q3', '$q4', '$q5')") ;
doesn't work - How to correct this.