# [web] MySQL Syntax error! Help (PHP, mysql)

## Recommended Posts

When make a entry with my form i use the following code to add the entry to my database:
<?php
if(isset($_POST['menu'])){$con = mysql_connect("localhost","user","pass");
mysql_select_db("database", $con);$sql="INSERT INTO menu (1, 3, 5, 7, 9, notes, order)
VALUES

##### Share on other sites
Using addslashes, or mysql_real_escape would do it. You need to get rid of the apostrophes (single quotes) in the input, in some way.

Oh, and LOL!