25.12.2015, 16:21
The script looks fine, except from this piece on top "?php" which should obviously be "<?php".
Furthermore, MySQL_* is deprecated and shouldn't be used anymore, I recommend you to use PDO or MySQLi. MySQL can't be used anymore from PHP 6.0 I believe, meaning your scripts won't run when this version becomes the standard. MySQLi has an excellent way of procedural programming, just like MySQL has, but I personally recommend PDO because it supports more database engines and in my opinion it's better overall.
Furthermore, MySQL_* is deprecated and shouldn't be used anymore, I recommend you to use PDO or MySQLi. MySQL can't be used anymore from PHP 6.0 I believe, meaning your scripts won't run when this version becomes the standard. MySQLi has an excellent way of procedural programming, just like MySQL has, but I personally recommend PDO because it supports more database engines and in my opinion it's better overall.