It's not really a good idea to put forward slashes in field names, but if it actually works, then it should work fine in your query if you use backticks. Also, you should be putting string array indices in single quotes. Change your initial query to this:
Code: Select all
$query = "INSERT INTO `client` SET `name`= '{$_POST['name']}', `email` = '{$_POST['email']}', `address` = '{$_POST['address']}', `web_programming` = '1', `desktop_programming` = '2', `hosting/registration` = '3'";
I assume all your fields are strings, because the last 3 values should be without single quotes if they are to be taken as integers. I also advise you to use the original INSERT syntax, it makes more sense than to use this syntax which looks like an UPDATE query. You can see the original INSERT syntax in the first example in the
manual.