Let's take the last error first: PHP cannot find mysql_connect(); this means there is something wrong with your PHP/MySQL installation. See the numerous messages re PHP/MySQL installation in this forum. There are several a week.
Now, the code you have posted in this message is HTML code, not PHP code, but you have written it inside <?php ?> tags, where PHP expects to find PHP code, not raw HTML code. You need to read a little about PHP and how it works, for example at
http://www.php.net/, download and try a few examples, get them working, and make sure you understand how and why they work ... before trying to write your own code. PHP offers amuch shorter learning curve than most other languages, but you do have to spend a few hours reading and trying examples.
PB