I'm getting a parser error on the following sql insert statement in my php script. A form where most of these values are entered submits the values to the php program. In the program, fter I connect/open the db I have this insert query. I've tried variations of this insert statement and am still getting the error. Can anyone make any suggestions as to what might be the problem?
$sqlinsert = "insert into table1 (firstname,lastname,address,phone,fax,email,idandname)
values
('$firstname','$lastname','$address','$phone',$'fax', '$email', null);
in the underlying table1, there is another field, an autoincremented key, that I have left completely out of this insert statement. (I have included it in other statements to try other options, with a value of null for it, but that isn't helping either.) Also the value for the idandname field is created later; it isn't entered via the form.
Once the form submits it's entered values to the php script that contains the above code I'm getting a parse error within this SQL statement.
HTML code follows
<td align="right"><font color="#66CCFF"> <b>
first name:</b> </font></td>
<td>
<input type="text" name="firstname" size="50" maxlength="50">
</td></tr>
<tr> <td align="right"><font color="#66CCFF"> <b>last
name:</b> </font></td>
<td>
<input type="text" name="lastname" size="50" maxlength="50">
</td>
</tr>
<tr>
<td align="right"><font color="#66CCFF"> <b>
address:</b> </font></td>
<td>
<input type="text" name="address" size="50" maxlength="50">
</td>
</tr>
<tr>
<td align="right"><font color="#66CCFF"> <b>
phone:</b> </font></td>
<td>
<input type="text" name="phone" size="50" maxlength="50">
</td>
</tr>
<tr>
<td align="right"><font color="#66CCFF"><b>fax:</b> </font></td>
<td align="left">
<input type="text" name="fax" size="50" maxlength="50">
</td>
</tr>
<tr>
<td align="right"><font color="#66CCFF"> <b>
E-mail:</b> </font></td>
<td align="left">
<input type="text" name="email" size="50" maxlength="50">
</td>
</tr>
etc.