Don't use the mysql extension. It's outdated and has been supplanted twice over, most recently by PDO, which is easier to use and more featureful (it supports prepared statements, for one thing). If you need a tutorial, try "Writing MySQL Scripts with PHP and PDO".
When asking for help with...