Verification: a143cc29221c9be0

Php and mysql insert query

Содержание

Notable Issues

a) switch to mysqli to be ready for future PHP changes. Get familiar with mysqli if you like mysql.

  1. You didn't select a database. mysql_select_db
  2. Important It's post data - which means, you really need to filter the information. To allow the entering of anything into a database using an insert, without escaping dangerous characters - you're leaving a lot to play with ;). Even, if you're the only one entering the information I changed a bit below. You have '{$menu_name}' with the single quotes, but {$position} and {$visible} without the single quotes - inconsistent is confusing when you go back months later.

Why is ('{$menu_name}', {$position}, {$visible}) not ('{$menu_name}', '{$position}', '{$visible}') ? instead.