Un tuto toujours bon pour se (re)mettre à PHP et utiliser MySQL décemment (c'est-à-dire en évitant les mysql* mais en utilisant mysqli* ou PDO)
MySQLi's documentation about how to manage prepared statements in PHP
MySQLi's library to use properly MySQL with PHP